summaryrefslogtreecommitdiffstats
path: root/etc/rc.firmware
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-06-26 16:58:15 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-06-26 16:58:15 -0400
commita3b8edea264430569b9039fb78f6434bd7539557 (patch)
tree406ddb6dc2ceeb631e21625011840a59b67aaf28 /etc/rc.firmware
parentdf5ffcf66080b19b0aaf63e61a7a178515e4f515 (diff)
downloadpfsense-a3b8edea264430569b9039fb78f6434bd7539557.zip
pfsense-a3b8edea264430569b9039fb78f6434bd7539557.tar.gz
Foot shooting is fun. Add some debugging echos to logger
Diffstat (limited to 'etc/rc.firmware')
-rwxr-xr-xetc/rc.firmware11
1 files changed, 11 insertions, 0 deletions
diff --git a/etc/rc.firmware b/etc/rc.firmware
index 9c88386..4680e20 100755
--- a/etc/rc.firmware
+++ b/etc/rc.firmware
@@ -187,15 +187,25 @@ pfSenseNanoBSDupgrade)
TOFLASH="${BOOT_DRIVE}s${SLICE}"
fi
+ echo $SLICE
+ echo $TOFLASH
+ echo $BOOT_DRIVE
+
+ # Foot shooting is fun!
+ /sbin/sysctl kern.geom.debugflags=16
+
# Remove TOFLASH and get ready for new flash image
dd if=/dev/zero of=/dev/${TOFLASH} bs=1m count=1
+ echo "dd if=/dev/zero of=/dev/${TOFLASH} bs=1m count=1" | logger -p daemon.info -i -t Upgrade
#>/dev/null 2>&1
# Stream gzipped image to dd and explode image to new area
+ echo "/usr/bin/gunzip -S "" -c $IMG | /bin/dd of=/dev/${TOFLASH} bs=16k" | logger -p daemon.info -i -t Upgrade
/usr/bin/gunzip -S "" -c $IMG | /bin/dd of=/dev/${TOFLASH} bs=16k
#>/dev/null 2>&1
# Ensure that our new system is sound and bail if it is not and file a notice
+ echo "/sbin/fsck_ffs -n /dev/${TOFLASH}a" | logger -p daemon.info -i -t Upgrade
/sbin/fsck_ffs -n /dev/${TOFLASH}a
if [ $? != 0 ]; then
/usr/local/bin/php -q -d auto_prepend_file=config.inc <<ENDOFF
@@ -209,6 +219,7 @@ ENDOFF
exit 1
fi
+ echo "/usr/sbin/boot0cfg -s ${SLICE} -v /dev/${REAL_BOOT_DEVICE}" | logger -p daemon.info -i -t Upgrade
/usr/sbin/boot0cfg -s ${SLICE} -v /dev/${REAL_BOOT_DEVICE}
#>/dev/null 2>&1
OpenPOWER on IntegriCloud