diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2014-02-26 16:48:01 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2014-02-26 16:48:01 +0100 |
commit | faae49c640ee2d308d40bc5867d6ecbd80ac0fc1 (patch) | |
tree | d49a49f6c8142a1762a339a99396421a127cc146 /debian/truecrypt.init | |
download | truecrypt-faae49c640ee2d308d40bc5867d6ecbd80ac0fc1.tar.gz truecrypt-faae49c640ee2d308d40bc5867d6ecbd80ac0fc1.tar.bz2 truecrypt-faae49c640ee2d308d40bc5867d6ecbd80ac0fc1.zip |
initial packaging based on http://www.unchartedbackwaters.co.uk/pyblosxom/static/truecrypt_debian_packaging
Diffstat (limited to 'debian/truecrypt.init')
-rwxr-xr-x | debian/truecrypt.init | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/debian/truecrypt.init b/debian/truecrypt.init new file mode 100755 index 0000000..b0deb74 --- /dev/null +++ b/debian/truecrypt.init @@ -0,0 +1,54 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: truecrypt +# Required-Start: +# Required-Stop: $remote_fs +# Should-Start: +# Should-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Remove remaining TrueCrypt device mappings. +### END INIT INFO + +PATH=/sbin:/usr/sbin:/bin:/usr/bin +TRUECRYPT_SHUTDOWN_UNMOUNT="yes" + +. /lib/lsb/init-functions + +[ -x /usr/bin/truecrypt ] || exit 0 + +if [ -r /etc/default/truecrypt ]; then + . /etc/default/truecrypt +fi + +case "${TRUECRYPT_SHUTDOWN_UNMOUNT}" in +[Nn]*) + exit 0 + ;; +esac + +do_stop() +{ + log_action_begin_msg "Removing TrueCrypt device mappings" + truecrypt -d + log_action_end_msg $? +} + +case "$1" in + start) + # No-op + ;; + restart|reload|force-reload) + # No-op + ;; + stop) + do_stop + ;; + *) + echo "Usage: $0 stop" >&2 + exit 3 + ;; +esac + +exit 0 |