aboutsummaryrefslogtreecommitdiff
path: root/scripts/naskconf
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/naskconf')
-rwxr-xr-xscripts/naskconf35
1 files changed, 0 insertions, 35 deletions
diff --git a/scripts/naskconf b/scripts/naskconf
deleted file mode 100755
index 5f82f22..0000000
--- a/scripts/naskconf
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-export ORGCHKSM="2057abcd4c0038fb3357680ac3057b208672d5d81bca85e1cc668f17d4060a23bda4c34352682b289d17a18f6ab75c4b9ea9df1a9f85709e3042ff7fdc83e245"
-export ORGFILE="/usr/share/initramfs-tools/scripts/local-top/cryptroot"
-
-
-. /usr/share/debconf/confmodule
-
-_nask_cmd () {
- db_get naskpass/active
- if [ "x$1" = "xACTV" ] && [ "$RET" = "false" ]; then
- if [ "${ORGCHKSM}" != "$(/usr/bin/sha512sum ${ORGFILE} | grep -Eo '^[0-9a-zA-Z]*')" ]; then
- export ERRMSG="$0: sha512sum mismatch"
- return 1
- fi
- dpkg-divert --package naskpass --add --rename --divert /var/backups/cryptroot.initramfs.bak ${ORGFILE}
- cp /usr/share/naskpass/naskpass.initscript ${ORGFILE}
- ln -s /usr/share/naskpass/naskpass.inithook \
- /usr/share/initramfs-tools/hooks/naskpass
- db_set naskpass/active true
- elif [ "x$1" = "xDCTV" ] && [ "$RET" = "true" ]; then
- rm ${ORGFILE}
- rm /usr/share/initramfs-tools/hooks/naskpass
- dpkg-divert --package naskpass --rename --remove ${ORGFILE}
- db_set naskpass/active false
- elif [ "x$1" = "xUPDT" ] && [ "$RET" = "true" ]; then
- cp /usr/share/naskpass/naskpass.initscript ${ORGFILE}
- fi
- return 0
-}
-
-nask_activate () { _nask_cmd "ACTV"; return $?; }
-nask_deactivate () { _nask_cmd "DCTV"; return $?; }
-nask_update () { _nask_cmd "UPDT"; return $?; }
-