/etc/init.d/cryptmount-early is in cryptmount 4.2.1-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | #!/bin/sh
# boot-time init script for cryptmount
# RW Penney, August 2006
# Basic support for Linux Standard Base:
### BEGIN INIT INFO
# Provides: cryptmount-early
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: S
# Default-Stop: 0 6
# Short-Description: setup encrypted devices at boot
# Description: configure device-mapper targets for encrypted
# devices managed by cryptmount
### END INIT INFO
CM_EXE=/usr/bin/cryptmount
DMPATH=/dev/mapper
CM_EARLYDV=""
# check whether cryptmount executable is usable:
test -x "${CM_EXE}" || exit 5
# read user-specified lists of filesystems to initialize:
if [ -f /etc/default/cryptmount ]; then
. /etc/default/cryptmount
fi
configured() {
# check if any of the targets needed at boot has been configured:
for target in ${CM_EARLYDV}; do
if [ -b "${DMPATH}/${target}" ]; then
true
return
fi
done
false
}
dodevices() {
case "$1" in
start) test -z "${CM_EARLYDV}" || ${CM_EXE} --prepare ${CM_EARLYDV}
;;
stop) test -z "${CM_BOOTDV}" || ${CM_EXE} --release ${CM_EARLYDV}
;;
esac
}
doALL() {
case "$1" in
start)
# Make sure that kernel device-mapper is available:
modprobe -q -a dm-mod dm-crypt || true
dodevices start
;;
stop)
dodevices stop
;;
esac
}
case "$1" in
start)
if configured; then
echo "cryptmount auto-devices seem to be already configured"
else
echo "Starting cryptmount early targets (hit shift/ctrl if short of entropy):"
doALL start
fi
;;
stop)
if configured; then
echo "Stopping cryptmount early targets:"
doALL stop
${CM_EXE} --safetynet || true
fi
;;
restart)
if configured; then
doALL stop
fi
doALL start
;;
force-reload|reload)
# nothing to do
;;
status)
if configured; then
echo "cryptmount auto-devices are in use"
else
echo "cryptmount auto-devices do not appear to be in use"
exit 3
fi
;;
*)
echo "Usage: $0 " \
" {start|stop|restart|reload|force-reload|status}" >&2
exit 1
;;
esac
exit 0
|