if egrep -q "[[:space:]]swap[[:space:]].*encryption=" /etc/fstab; then modprobe loop 2> /dev/null modprobe aes 2> /dev/null modprobe cryptoloop 2> /dev/null fi # /MiB #BEGIN EXTRA SECTION #/dev/loop* should appear as a result of modprobing loop. However, it sometimes takes a while, #and if we are rebooting after a crash, it is sometimes necessary to give udev a prod with udevstart. if [ ! -b /dev/loop0 ] ;then #If /dev/loop0 not there, sleep 2. action "Sleeping for 2 seconds, to allow /dev/loop* to appear: " sleep 2 if [ ! -b /dev/loop0 ] ;then #If still not there, prod udev and sleep 2. action "/dev/loop0 still not ready. Poking udev with sharp stick: " udevstart sleep 2 if [ ! -b /dev/loop0 ] ;then #If *still* not there, we are in trouble. action "Bother! /dev/loop0 still not found - we have a problem. " /bin/false fi fi fi #END EXTRA SECTION action "Activating swap partitions: " swapon -a -e rc_splash swap 5