Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##lines 123 to 149 of /etc/rc.d/rc.sysinit
- ## http://www.pearltrees.com/s243a/rc-sysinit-puppylinux/id16200212
- loadswap_func() { #w481 made into a function.
- echo "LOAD SWAP"
- #load a swap partition...
- for ONESWAP in `fdisk -l | grep ' Linux swap' | cut -f 1 -d ' ' | tr '\n' ' '`
- do
- echo -n "Loading swap partition $ONESWAP..." >/dev/console #loading swap partition
- swapon $ONESWAP
- status_func $?
- [ $? -eq 0 ] && SWAPON="yes"
- done
- #if no go, try for a swap file...
- if [ "$SWAPON" != "yes" ];then
- SWAPFILE="/pupswap.swp"
- if [ -f /initrd${PUP_HOME}${SWAPFILE} ];then
- echo -n "Loading swap file ${SWAPFILE}..." >/dev/console #loading swap file
- swapon /initrd${PUP_HOME}${SWAPFILE}
- status_func $?
- [ $? -eq 0 ] && SWAPON="yes"
- fi
- if [ -f $SWAPFILE ];then
- echo -n "Loading swap file ${SWAPFILE}..." >/dev/console
- swapon $SWAPFILE
- status_func $?
- [ $? -eq 0 ] && SWAPON="yes"
- fi
- fi
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement