summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2004-11-28 21:08:14 +0000
committerScott Ullrich <sullrich@pfsense.org>2004-11-28 21:08:14 +0000
commit2ed803e736d9256aafae7a29ae0bb84aaf746c5f (patch)
tree487b4bc445990d395ed9696be940c62907a7f349
parent0810f28a75fc01fe52b9a672daae87469fa98268 (diff)
downloadpfsense-2ed803e736d9256aafae7a29ae0bb84aaf746c5f.zip
pfsense-2ed803e736d9256aafae7a29ae0bb84aaf746c5f.tar.gz
Do not hard code IDE swap device, probe /etc/fstab for its existance
-rwxr-xr-xetc/rc5
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/rc b/etc/rc
index ae91c86..4a027e5 100755
--- a/etc/rc
+++ b/etc/rc
@@ -20,11 +20,12 @@ echo
echo "Starting pfSense ..."
echo
-/sbin/dumpon -v /dev/ad0s1b
+SWAPDEVICE=`cat /etc/fstab | grep swap | cut -f1`
+/sbin/dumpon -v $SWAPDEVICE
/sbin/mount -a || fsck -y && mount -a
/sbin/swapon -a
/bin/mkdir -p /usr/savecore 2>/dev/null
-/sbin/savecore /usr/savecore /dev/ad0s1b
+/sbin/savecore /usr/savecore $SWAPDEVICE
rm -rf /var/run/*
rm -rf /tmp/*
OpenPOWER on IntegriCloud