Fixed hooks for debian stretch
This commit is contained in:
parent
2766676eca
commit
8633a6154a
2 changed files with 12 additions and 9 deletions
15
hooks/decrypt.hook
Normal file → Executable file
15
hooks/decrypt.hook
Normal file → Executable file
|
@ -1,9 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
PREREQS="udev"
|
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"
|
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()
|
prereqs()
|
||||||
{
|
{
|
||||||
|
@ -25,6 +25,7 @@ for exec in ${EXEC}; do
|
||||||
copy_exec "${exec}"
|
copy_exec "${exec}"
|
||||||
else
|
else
|
||||||
echo "${exec} not found"
|
echo "${exec} not found"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
mkdir -p ${DESTDIR}/lib/udev/rules.d/; do
|
mkdir -p ${DESTDIR}/lib/udev/rules.d/; do
|
||||||
|
@ -39,14 +40,16 @@ for rules in ${RULES}; do
|
||||||
done
|
done
|
||||||
|
|
||||||
for files in ${FILES}; do
|
for files in ${FILES}; do
|
||||||
FILES_SRC=$(echo ${files} | sed 's/.*://')
|
FILES_SRC=$(echo ${files} | sed 's/:.*//')
|
||||||
FILES_DST=$(echo ${files} | sed 's/:.*//')
|
FILES_DST=$(echo ${files} | sed 's/.*://')
|
||||||
FILES_NAME=$(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
|
if [ -e ${FILES_SRC} ]; then
|
||||||
cp -p "${FILES_SRC}" "${DESTDIR}/{FILES_DST}"
|
cp -p "${FILES_SRC}" "${DESTDIR}${FILES_DST}"
|
||||||
else
|
else
|
||||||
echo "${FILES_SRC} not found"
|
echo "${FILES_SRC} not found"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
2
hooks/decrypt.install
Normal file → Executable file
2
hooks/decrypt.install
Normal file → Executable file
|
@ -16,4 +16,4 @@ prereqs)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
/sbin/bash "/usr/bin/decrypt open"
|
/bin/bash decrypt open
|
||||||
|
|
Loading…
Reference in a new issue