From d9c551cec19d2236e5285a4c3f5bc2502a00a670 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 23 Aug 2009 18:25:34 -0400 Subject: Resurvey slice info after changes. Resolves #52 --- usr/local/www/diag_nanobsd.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'usr') 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"; -- cgit v1.1