diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-08-23 18:25:34 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-08-23 18:25:34 -0400 |
commit | d9c551cec19d2236e5285a4c3f5bc2502a00a670 (patch) | |
tree | 207a7b9a165b53889651130711b71d560086d2d4 /usr | |
parent | a3a22a4ec17156d3ca9aa0fd19934aac82cd1c33 (diff) | |
download | pfsense-d9c551cec19d2236e5285a4c3f5bc2502a00a670.zip pfsense-d9c551cec19d2236e5285a4c3f5bc2502a00a670.tar.gz |
Resurvey slice info after changes. Resolves #52
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/diag_nanobsd.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/local/www/diag_nanobsd.php b/usr/local/www/diag_nanobsd.php index e2af6ec..06f4c3e 100755 --- a/usr/local/www/diag_nanobsd.php +++ b/usr/local/www/diag_nanobsd.php @@ -43,13 +43,15 @@ require_once("config.inc"); $pgtitle = array("Diagnostics","NanoBSD"); include("head.inc"); -$BOOT_DEVICE=trim(`/sbin/mount | /usr/bin/grep pfsense | /usr/bin/cut -d'/' -f4 | /usr/bin/cut -d' ' -f1`); -$REAL_BOOT_DEVICE=trim(`/sbin/glabel list | /usr/bin/grep -B2 ufs/{$BOOT_DEVICE} | /usr/bin/head -n 1 | /usr/bin/cut -f3 -d' '`); -$BOOT_DRIVE=trim(`/sbin/glabel list | /usr/bin/grep -B2 ufs/pfsense | /usr/bin/head -n 1 | /usr/bin/cut -f3 -d' ' | /usr/bin/cut -d's' -f1`); - function detect_slice_info() { global $SLICE, $OLDSLICE, $TOFLASH, $COMPLETE_PATH, $COMPLETE_BOOT_PATH; global $GLABEL_SLIZE, $UFS_ID, $OLD_UFS_ID, $BOOTFLASH; + global $BOOT_DEVICE, $REAL_BOOT_DEVICE, $BOOT_DRIVE; + + $BOOT_DEVICE=trim(`/sbin/mount | /usr/bin/grep pfsense | /usr/bin/cut -d'/' -f4 | /usr/bin/cut -d' ' -f1`); + $REAL_BOOT_DEVICE=trim(`/sbin/glabel list | /usr/bin/grep -B2 ufs/{$BOOT_DEVICE} | /usr/bin/head -n 1 | /usr/bin/cut -f3 -d' '`); + $BOOT_DRIVE=trim(`/sbin/glabel list | /usr/bin/grep -B2 ufs/pfsense | /usr/bin/head -n 1 | /usr/bin/cut -f3 -d' ' | /usr/bin/cut -d's' -f1`); + // Detect which slice is active and set information. if(strstr($REAL_BOOT_DEVICE, "s1")) { $SLICE="2"; |