summaryrefslogtreecommitdiffstats
path: root/debian/open-infrastructure-dehydrated-tools.postinst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-28 09:54:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-28 10:28:08 +0000
commit7ad66678a7abca725ba922db8540dc9b96f22adb (patch)
tree1b86fef5112a5c9ecd67720e764e1ae691e625c1 /debian/open-infrastructure-dehydrated-tools.postinst
parentReleasing debian version 20210828-1. (diff)
downloadopen-infrastructure-service-tools-7ad66678a7abca725ba922db8540dc9b96f22adb.tar.xz
open-infrastructure-service-tools-7ad66678a7abca725ba922db8540dc9b96f22adb.zip
Allowing to specify 'ALL' in dehydrated hooks preseeding.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/open-infrastructure-dehydrated-tools.postinst')
-rwxr-xr-xdebian/open-infrastructure-dehydrated-tools.postinst7
1 files changed, 6 insertions, 1 deletions
diff --git a/debian/open-infrastructure-dehydrated-tools.postinst b/debian/open-infrastructure-dehydrated-tools.postinst
index 116223f..fdf39dc 100755
--- a/debian/open-infrastructure-dehydrated-tools.postinst
+++ b/debian/open-infrastructure-dehydrated-tools.postinst
@@ -116,9 +116,14 @@ case "${1}" in
HOOKS="$(echo ${HOOKS} | sed -e 's|,| |g')"
+ if echo "${HOOKS}" | grep -qs "ALL"
+ then
+ HOOKS="$(cd /usr/share/dehydrated/hooks && find -maxdepth 1 -not -type d -printf '%P\n' | sort)"
+ fi
+
for HOOK in ${HOOKS}
do
- if [ ! -e "/etc/dehydrated/hook.d/${HOOK}" ]
+ if [ ! -e "/etc/dehydrated/hook.d/${HOOK}" ] && [ -e "/usr/share/dehydrated/hooks/${HOOK}" ]
then
ln -sf "/usr/share/dehydrated/hooks/${HOOK}" "/etc/dehydrated/hook.d/${HOOK}"
fi