diff options
author | Hec | 2021-05-15 18:34:24 -0400 |
---|---|---|
committer | Hec | 2021-05-15 18:34:24 -0400 |
commit | 099096292553f6c910fe9a6093e2a917ffc4ca2f (patch) | |
tree | 88e50bb017357d01681d72abcbfea98c06608af6 /cryptsetup | |
download | aur-099096292553f6c910fe9a6093e2a917ffc4ca2f.tar.gz |
Create my very first AUR Package
Diffstat (limited to 'cryptsetup')
-rwxr-xr-x | cryptsetup | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/cryptsetup b/cryptsetup new file mode 100755 index 000000000000..bb67e3dd05f2 --- /dev/null +++ b/cryptsetup @@ -0,0 +1,28 @@ +#!/bin/bash + +# sourcing our current rc.conf requires this to be a bash script +. /usr/lib/rc/functions + +case "$1" in + start) + if [ -e /etc/crypttab ]; then + stat_busy "Activating encrypted devices" + awk -f /etc/runit/crypt.awk /etc/crypttab || stat_die cryptsetup + fi + add_daemon cryptsetup + stat_done cryptsetup + ;; + stop) + stat_busy "Stopping encrypted devices" + rc=$? + read_crypttab do_lock + (( rc || $? )) && stat_die + rm_daemon cryptsetup + stat_done + ;; + + *) + echo "usage: $0 {start}" + exit 1 + ;; +esac |