Please provide the file changes (diffs) for me to generate a commit message.
This commit is contained in:
@@ -46,8 +46,18 @@ $prdname = "bastille";
|
||||
$application = "Bastille Manager";
|
||||
$restore_name = "restore";
|
||||
$confdir = "/var/etc/bastille_conf";
|
||||
$cwdir = exec("/usr/bin/grep 'INSTALL_DIR=' $confdir/conf/bastille_config | /usr/bin/cut -d'\"' -f2");
|
||||
$rootfolder = $cwdir;
|
||||
|
||||
// Check for configuration file
|
||||
$conf_file = "$confdir/conf/bastille_config";
|
||||
if (!file_exists($conf_file) && file_exists(__DIR__ . "/../conf/bastille_config")) {
|
||||
$conf_file = __DIR__ . "/../conf/bastille_config";
|
||||
}
|
||||
|
||||
$cwdir = exec("/usr/bin/grep 'INSTALL_DIR=' $conf_file | /usr/bin/cut -d'\"' -f2");
|
||||
if (!empty($cwdir)) {
|
||||
$rootfolder = $cwdir;
|
||||
}
|
||||
|
||||
$configfile = "$rootfolder/conf/bastille_config";
|
||||
$configfile_bastille = "$rootfolder/bastille-dist/usr/local/etc/bastille/bastille.conf";
|
||||
$versionfile = "$rootfolder/version";
|
||||
@@ -55,20 +65,24 @@ $versionfile = "$rootfolder/version";
|
||||
$date = date('D M d h:i:s Y', time()); // Equivalent date replacement for the previous strftime function.
|
||||
$logfile = "$rootfolder/log/bastille_ext.log";
|
||||
$logevent = "$rootfolder/log/bastille_last_event.log";
|
||||
$backup_path = exec("/usr/bin/grep 'BACKUP_DIR=' $configfile | /usr/bin/cut -d'\"' -f2");
|
||||
|
||||
// Reuse $conf_file if it's our local one, otherwise use the standard greed
|
||||
$grep_config = file_exists($configfile) ? $configfile : $conf_file;
|
||||
|
||||
$backup_path = exec("/usr/bin/grep 'BACKUP_DIR=' $grep_config | /usr/bin/cut -d'\"' -f2");
|
||||
$bastille_config = "$rootfolder/conf/bastille_config";
|
||||
$config_path = exec("/usr/bin/grep 'BASTILLE_CONFIG=' $configfile | /usr/bin/cut -d'\"' -f2");
|
||||
$config_path = exec("/usr/bin/grep 'BASTILLE_CONFIG=' $grep_config | /usr/bin/cut -d'\"' -f2");
|
||||
$default_distfiles = exec("/usr/bin/grep 'bastille_bootstrap_archives=' $config_path | /usr/bin/cut -d'\"' -f2");
|
||||
$jail_dir = "{$rootfolder}/jails";
|
||||
$image_dir = "ext/bastille/images";
|
||||
$reldir = "{$rootfolder}/releases";
|
||||
$backup_path_bastille = exec("/usr/sbin/sysrc -f $rootfolder/bastille-dist/usr/local/etc/bastille/bastille.conf -qn bastille_backupsdir");
|
||||
$zfs_support = exec("/usr/bin/grep 'ZFS_SUPPORT=' $configfile | /usr/bin/cut -d'\"' -f2");
|
||||
$zfs_activated = exec("/usr/bin/grep 'ZFS_ACTIVATED=' $configfile | /usr/bin/cut -d'\"' -f2");
|
||||
$tarballversion = "/usr/local/bin/bastille";
|
||||
$zfs_support = exec("/usr/bin/grep 'ZFS_SUPPORT=' $grep_config | /usr/bin/cut -d'\"' -f2");
|
||||
$zfs_activated = exec("/usr/bin/grep 'ZFS_ACTIVATED=' $grep_config | /usr/bin/cut -d'\"' -f2");
|
||||
if (!isset($tarballversion)) $tarballversion = "/usr/local/bin/bastille";
|
||||
$bastille_version_min = exec("grep 'BASTILLE_VERSION=' $tarballversion | cut -d '\"' -f2 | tr -d '.'");
|
||||
$host_version = exec("/bin/cat /etc/prd.version | tr -d '.'");
|
||||
$linux_compat_support = exec("/usr/bin/grep 'LINUX_COMPAT_SUPPORT=' $configfile | /usr/bin/cut -d'\"' -f2");
|
||||
$linux_compat_support = exec("/usr/bin/grep 'LINUX_COMPAT_SUPPORT=' $grep_config | /usr/bin/cut -d'\"' -f2");
|
||||
$jail_settings = "settings.conf";
|
||||
|
||||
// Ensure the root directory is configured.
|
||||
@@ -146,7 +160,7 @@ function get_state_zfs() {
|
||||
function get_all_release_list() {
|
||||
global $rootfolder;
|
||||
global $g;
|
||||
exec("/bin/echo; /bin/ls {$rootfolder}/releases | grep RELEASE 2>/dev/null | /usr/bin/tr -s ' ' '\n'",$relinfo);
|
||||
exec("/bin/echo; /bin/ls {$rootfolder}/releases | /usr/bin/tr -s ' ' '\n'",$relinfo);
|
||||
array_shift($relinfo);
|
||||
$rellist = [];
|
||||
foreach($relinfo as $rel):
|
||||
|
||||
Reference in New Issue
Block a user