7 for _PARAMETER
in ${_CMDLINE}
9 case "${_PARAMETER}" in
10 live-boot.swap
=*|swap
=*)
12 LIVE_SWAP_DEVICES
="${_PARAMETER#*swap=}"
21 case "${LIVE_SWAP}" in
30 LIVE_SWAP_DEVICES
="${LIVE_SWAP_DEVICES:-/dev/sd* /dev/vd*}"
32 for _DEVICE
in $
(echo ${LIVE_SWAP_DEVICES} |
sed -e 's|,| |g')
34 if [ ! -b "${_DEVICE}" ]
39 blkid
-o udev
-p ${_DEVICE%%[0-9]*} |
grep -q "^ID_FS_USAGE=raid" && continue
41 _MAGIC
="$(/bin/dd if=${_DEVICE} bs=4086 skip=1 count=1 2>/dev/null | /bin/dd bs=10 count=1 2>/dev/null)" ||
continue
44 SWAPSPACE2|SWAP-SPACE
)
45 _SWAP_DEVICES
="${_SWAP_DEVICES} ${_DEVICE}"
50 # Remove all auto swap entries
51 if grep -qs "swap swap" /root
/etc
/fstab.d
/swap
53 grep -v "swap swap" /root
/etc
/fstab.d
/swap
> /root
/etc
/fstab.d
/swap.tmp
54 mv /root
/etc
/fstab.d
/swap.tmp
/root
/etc
/fstab.d
/swap
57 # Add new swap entries
58 for _DEVICE
in ${_SWAP_DEVICES}
60 echo "${_DEVICE} swap swap defaults 0 0" >> /root
/etc
/fstab.d
/swap