#!/usr/bin/ash run_hook() { # Set these variables to help osk-sdl display correctly. export ETNA_MESA_DEBUG=no_supertile export SDL_VIDEODRIVER=kmsdrm modprobe -a -q dm-crypt >/dev/null 2>&1 if [ -n "${cryptdevice}" ]; then DEPRECATED_CRYPT=0 IFS=: read cryptdev cryptname </dev/null 2>&1; then [ ${DEPRECATED_CRYPT} -eq 1 ] && warn_deprecated dopassphrase=1 # Ask for a passphrase if [ ${dopassphrase} -gt 0 ]; then echo "" echo "A password is required to access the ${cryptname} volume" #loop until we get a real password while ! [ -b "/dev/mapper/${cryptname}" ]; do osk-sdl -G -d ${resolved} -n ${cryptname} -c /etc/osk.conf done fi if [ -e "/dev/mapper/${cryptname}" ]; then if [ ${DEPRECATED_CRYPT} -eq 1 ]; then export root="/dev/mapper/root" fi else err "Password succeeded, but ${cryptname} creation failed, aborting..." return 1 fi else err "Failed to open encryption mapping: The device ${cryptdev} is not a LUKS volume." fi fi OLDIFS="$IFS"; IFS=, if [ -n "${osk_kms}" ]; then for i in $osk_kms do echo "Resetting $i module" rmmod -f "$i" done fi IFS="$OLDIFS" unset OLDIFS } # vim: set ft=sh ts=4 sw=4 et: