mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Do not hard code IDE swap device, probe /etc/fstab for its existance
This commit is contained in:
parent
0810f28a75
commit
2ed803e736
5
etc/rc
5
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/*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user