From aa5b8cc1a899b5de24f132e5ffa3354f70527ea2 Mon Sep 17 00:00:00 2001 From: toni Date: Mon, 21 Apr 2014 14:37:58 +0200 Subject: added activate/deactivate feature (7) --- debian/postinst | 2 +- debian/preinst | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/debian/postinst b/debian/postinst index 5fd7ea1..bcc17a8 100644 --- a/debian/postinst +++ b/debian/postinst @@ -62,7 +62,7 @@ case "$1" in update-initramfs -u ;; - upgrade) + upgrade|abort-upgrade) update-initramfs -u ;; diff --git a/debian/preinst b/debian/preinst index 5f5cc63..e6e374c 100644 --- a/debian/preinst +++ b/debian/preinst @@ -11,7 +11,7 @@ export ORGFILE="/usr/share/initramfs-tools/scripts/local-top/cryptroot" export DIVFILE="/usr/share/naskpass/cryptroot.orig" case "$1" in - install) + install|upgrade) mkdir -p /usr/share/naskpass if [ ! -f ${ORGFILE} ]; then whiptail --title "Missing file" --msgbox "/usr/share/initramfs-tools/scripts/local-top/cryptroot is missing!\nabort .." 9 70 @@ -19,13 +19,11 @@ case "$1" in if [ ${RDSUM} = "$(sha512sum ${ORGFILE} | grep -Eo '^[0-9a-zA-Z]*')" ]; then dpkg-divert --package naskpass --divert ${DIVFILE} --rename --add ${ORGFILE} update-initramfs -u - else - whiptail --title "Wrong SHA checksum" --msgbox "in /usr/share/initramfs-tools/scripts/local-top/cryptroot\n\nabort .." 9 70 fi fi ;; - upgrade) + abort-upgrade) ;; *) -- cgit v1.2.3