diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-07-05 21:13:16 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-07-05 21:13:16 -0400 |
commit | 8c292e5468f6575bbbe2d9c52360e4a6ad84fda4 (patch) | |
tree | 9564cbb12cd5725847d28f507554e962c3f2a1d0 | |
parent | 28949aa18d067db9e52d99a316970600de806900 (diff) | |
download | pfsense-8c292e5468f6575bbbe2d9c52360e4a6ad84fda4.zip pfsense-8c292e5468f6575bbbe2d9c52360e4a6ad84fda4.tar.gz |
Full path to binaries. Correct the failed message.
-rwxr-xr-x | usr/local/www/diag_nanobsd.php | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/usr/local/www/diag_nanobsd.php b/usr/local/www/diag_nanobsd.php index 6a9a47c..8808373 100755 --- a/usr/local/www/diag_nanobsd.php +++ b/usr/local/www/diag_nanobsd.php @@ -66,32 +66,33 @@ if(strstr($REAL_BOOT_DEVICE, "s1")) { if($_POST['bootslice']) { exec("gpart set -a active -i {$SLICE} {$BOOT_DRIVE}"); exec("/usr/sbin/boot0cfg -s {$SLICE} -v /dev/{$BOOT_DRIVE}"); - exec("mkdir /tmp/{$GLABEL_SLICE}"); - exec("mount /dev/ufs/{$GLABEL_SLICE} /tmp/{$GLABEL_SLICE}"); - exec("cp /etc/fstab /tmp/{$GLABEL_SLICE}/etc/fstab"); + exec("/bin/mkdir /tmp/{$GLABEL_SLICE}"); + exec("/sbin/mount /dev/ufs/{$GLABEL_SLICE} /tmp/{$GLABEL_SLICE}"); + exec("/bin/cp /etc/fstab /tmp/{$GLABEL_SLICE}/etc/fstab"); $status = exec("sed -i \"\" \"s/pfsense{$OLD_UFS_ID}/pfsense{$UFS_ID}/g\" /tmp/{$GLABEL_SLICE}/etc/fstab"); if($status) { file_notice("UpgradeFailure","Something went wrong when trying to update the fstab entry. Aborting upgrade."); - exec("umount /tmp/$GLABEL_SLICE"); + exec("/sbin/umount /tmp/{$GLABEL_SLICE}"); } - exec("umount /tmp/$GLABEL_SLICE"); + exec("/sbin/umount /tmp/{$GLABEL_SLICE}"); $savemsg = "The boot slice has been set to {$BOOT_DRIVE} {$SLICE}"; } if($_POST['destslice']) { exec("dd if=/dev/zero of=/dev/{$TOFLASH} bs=1m count=1"); exec("/bin/dd if=/dev/{$BOOTFLASH} of=/dev/{$TOFLASH} obs=64k"); - exec("gpart set -a active -i {$SLICE} {$BOOT_DRIVE}"); - exec("mkdir /tmp/{$GLABEL_SLICE}"); - exec("mount /dev/ufs/{$GLABEL_SLICE} /tmp/{$GLABEL_SLICE}"); - exec("cp /etc/fstab /tmp/{$GLABEL_SLICE}/etc/fstab"); + exec("/sbin/gpart set -a active -i {$SLICE} {$BOOT_DRIVE}"); + exec("/bin/mkdir /tmp/{$GLABEL_SLICE}"); + exec("/sbin/mount /dev/ufs/{$GLABEL_SLICE} /tmp/{$GLABEL_SLICE}"); + exec("/bin/cp /etc/fstab /tmp/{$GLABEL_SLICE}/etc/fstab"); $status = exec("sed -i \"\" \"s/pfsense{$OLD_UFS_ID}/pfsense{$UFS_ID}/g\" /tmp/{$GLABEL_SLICE}/etc/fstab"); if($status) { - file_notice("UpgradeFailure","Something went wrong when trying to update the fstab entry. Aborting upgrade."); - exec("umount /tmp/$GLABEL_SLICE"); + exec("/sbin/umount /tmp/{$GLABEL_SLICE}"); + $savemsg = "There was an error while duplicating the slice. Operation aborted."; + } else { + exec("/sbin/umount /tmp/{$GLABEL_SLICE}"); + exec("/usr/sbin/boot0cfg -s {$SLICE} -v /dev/{$BOOT_DRIVE}"); } - exec("umount /tmp/$GLABEL_SLICE"); - exec("/usr/sbin/boot0cfg -s {$SLICE} -v /dev/{$BOOT_DRIVE}"); } ?> @@ -117,7 +118,7 @@ if ($savemsg) <strong>NOTE: </strong> </span> The options on this page are intended for use by advanced users only. - <br/> + <p/> </span> <br/> <table width="100%" border="0" cellpadding="6" cellspacing="0"> |