Fix for jail auto-start settings with names containing dashes

This commit is contained in:
Jose
2020-08-25 18:37:41 -04:00
parent 6e7f479ed1
commit 9932b00a37
4 changed files with 7 additions and 6 deletions

View File

@@ -229,7 +229,7 @@ function get_jail_infos() {
$r['path'] = "-";
endif;
// Display auto-start settings.
$jail_autostart = exec("/usr/sbin/sysrc -qn -f {$configfile} {$item}_AUTO_START");
$jail_autostart = exec("/usr/bin/grep -w {$item}_AUTO_START $configfile | cut -d'=' -f2 | tr -d '\"'");
if ($jail_autostart == 'YES') {
$r['boot'] = $img_path['ena'];
} elseif ($jail_autostart == 'NO') {