From 8633a6154aa09e6a843751fa1f8e998be0dcb1a6 Mon Sep 17 00:00:00 2001 From: ayakael Date: Tue, 16 May 2017 15:44:46 -0500 Subject: [PATCH] Fixed hooks for debian stretch --- hooks/decrypt.hook | 19 +++++++++++-------- hooks/decrypt.install | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) mode change 100644 => 100755 hooks/decrypt.hook mode change 100644 => 100755 hooks/decrypt.install diff --git a/hooks/decrypt.hook b/hooks/decrypt.hook old mode 100644 new mode 100755 index b5a726b..6b5b2f5 --- a/hooks/decrypt.hook +++ b/hooks/decrypt.hook @@ -1,9 +1,9 @@ #!/bin/sh PREREQS="udev" -EXEC="/usr/bin/bash /sbin/cryptsetup dmsetup mount egrep lsblk sed tput" +EXEC="/usr/bin/decrypt /bin/bash /sbin/cryptsetup /sbin/dmsetup /bin/mount /bin/egrep /bin/lsblk /bin/sed /usr/bin/tput" RULES="55-dm.rules" -FILES="'/usr/share/terminfo/l/linux-16color:/lib/terminfo/l/linux' '/usr/share/initramfs-tools/scripts/local-premount/decrypt.sh:/usr/bin/decrypt'" +FILES='/usr/share/terminfo/l/linux-16color:/lib/terminfo/l/linux' prereqs() { @@ -25,6 +25,7 @@ for exec in ${EXEC}; do copy_exec "${exec}" else echo "${exec} not found" + fi done mkdir -p ${DESTDIR}/lib/udev/rules.d/; do @@ -39,15 +40,17 @@ for rules in ${RULES}; do done for files in ${FILES}; do - FILES_SRC=$(echo ${files} | sed 's/.*://') - FILES_DST=$(echo ${files} | sed 's/:.*//') + FILES_SRC=$(echo ${files} | sed 's/:.*//') + FILES_DST=$(echo ${files} | sed 's/.*://') FILES_NAME=$(echo ${files} | sed 's|.*/||') - mkdir -p ${DESTDIR}/${FILES_NAME} + FILES_PATH=$(echo ${FILES_DST} | sed "s|${FILES_NAME}||") + mkdir -p ${DESTDIR}${FILES_PATH} if [ -e ${FILES_SRC} ]; then - cp -p "${FILES_SRC}" "${DESTDIR}/{FILES_DST}" + cp -p "${FILES_SRC}" "${DESTDIR}${FILES_DST}" else echo "${FILES_SRC} not found" + fi done - -exit 0 \ No newline at end of file + +exit 0 diff --git a/hooks/decrypt.install b/hooks/decrypt.install old mode 100644 new mode 100755 index 47ede7f..819ecc3 --- a/hooks/decrypt.install +++ b/hooks/decrypt.install @@ -16,4 +16,4 @@ prereqs) ;; esac -/sbin/bash "/usr/bin/decrypt open" \ No newline at end of file +/bin/bash decrypt open