diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-07-24 21:56:32 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-07-24 21:56:32 -0400 |
commit | a340cf5ee58f91ed5d8e80ddb83a3cff5ac7c158 (patch) | |
tree | e5c2ba34ebb7e1a13d38671e03c510e5814ebe21 /usr/local/www/diag_nanobsd.php | |
parent | 8b0996560c37fc441223d7d9857134b38366e404 (diff) | |
download | pfsense-a340cf5ee58f91ed5d8e80ddb83a3cff5ac7c158.zip pfsense-a340cf5ee58f91ed5d8e80ddb83a3cff5ac7c158.tar.gz |
Add debugmode sysctls
Diffstat (limited to 'usr/local/www/diag_nanobsd.php')
-rwxr-xr-x | usr/local/www/diag_nanobsd.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr/local/www/diag_nanobsd.php b/usr/local/www/diag_nanobsd.php index b6e0954..83a344e 100755 --- a/usr/local/www/diag_nanobsd.php +++ b/usr/local/www/diag_nanobsd.php @@ -107,6 +107,7 @@ EOF; $AOLD_UFS_ID="1"; $ABOOTFLASH="{$ABOOT_DRIVE}s{$AOLDSLICE}"; } + exec("sysctl kern.geom.debugflags=16"); exec("gpart set -a active -i {$ASLICE} {$BOOT_DRIVE}"); exec("/usr/sbin/boot0cfg -s {$ASLICE} -v /dev/{$BOOT_DRIVE}"); exec("/bin/mkdir /tmp/{$AGLABEL_SLICE}"); @@ -119,6 +120,7 @@ EOF; EOF; file_put_contents("/tmp/{$AGLABEL_SLICE}/etc/fstab", $fstab); exec("/sbin/umount /tmp/{$AGLABEL_SLICE}"); + exec("sysctl kern.geom.debugflags=0"); $savemsg = "The boot slice has been set to {$ABOOT_DRIVE} {$AGLABEL_SLICE}"; } @@ -133,6 +135,7 @@ echo <<<EOF EOF; for ($i = 0; $i < ob_get_level(); $i++) { ob_end_flush(); } ob_implicit_flush(1); + exec("sysctl kern.geom.debugflags=16"); exec("dd if=/dev/zero of=/dev/{$TOFLASH} bs=1m count=1"); exec("/bin/dd if=/dev/{$BOOTFLASH} of=/dev/{$TOFLASH} bs=64k"); exec("/sbin/tunefs -L {$GLABEL_SLICE} /dev/{$COMPLETE_PATH}"); @@ -148,6 +151,7 @@ EOF; $savemsg = "The slice has been duplicated.<p/>If you would like to boot from this newly duplicated slice please set it using the bootup information area."; exec("/sbin/umount /tmp/{$GLABEL_SLICE}"); } + exec("sysctl kern.geom.debugflags=0"); } if ($savemsg) |