From 96099c6a291ed2d38e624f08eca708c0e1825d47 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 28 Jul 2009 14:26:53 -0300 Subject: Call conf_mount_rw() before execute boot0cfg to prevent I/O errors --- usr/local/www/diag_nanobsd.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr/local/www/diag_nanobsd.php') diff --git a/usr/local/www/diag_nanobsd.php b/usr/local/www/diag_nanobsd.php index 6715902..0733994 100755 --- a/usr/local/www/diag_nanobsd.php +++ b/usr/local/www/diag_nanobsd.php @@ -38,6 +38,7 @@ ini_set('implicit_flush', 1); ini_set('max_input_time', '9999'); require_once("guiconfig.inc"); +require_once("config.inc"); $pgtitle = array("Diagnostics","NanoBSD"); include("head.inc"); @@ -108,13 +109,13 @@ EOF; $AOLD_UFS_ID="1"; $ABOOTFLASH="{$BOOT_DRIVE}s{$AOLDSLICE}"; } + conf_mount_rw(); 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}"); exec("/sbin/fsck_ufs -y /dev/{$ACOMPLETE_PATH}"); exec("/sbin/mount /dev/ufs/{$AGLABEL_SLICE} /tmp/{$AGLABEL_SLICE}"); - exec("/bin/cp /etc/fstab /tmp/{$AGLABEL_SLICE}/etc/fstab"); $fstab = <<