#! /bin/bash # # Start the crypto device # # Source function library. . /etc/init.d/functions RETVAL=0 # See how we were called. start() { echo "Now starting the crypto FS service." > /dev/console echo " passphrase?" > /dev/console losetup /dev/loop0 /crypto.fs cryptsetup create homes /dev/loop0 mount /home && exit 0 echo "There is a problem with mounting the home directory." > /dev/console echo "Would you like to skip this step and finish booting (y/n)?" > /dev/console read -n 1 answer echo "" if [ $answer == "y" ]; then exit 1; fi cryptsetup remove homes losetup -d /dev/loop0 start } stop() { echo } case "$1" in start) start ;; stop) stop ;; restart) restart ;; reload) reload ;; status) rhstatus ;; condrestart) [ -f /var/lock/subsys/crond ] && restart || : ;; *) echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}" exit 1 esac exit $?