summaryrefslogtreecommitdiff
path: root/helpers/lh_chroot_hooks
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2009-01-26 15:01:22 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:09:40 +0100
commit58d6b235f955c9d8b7f8bd7c03360b712840b269 (patch)
tree19fe4e0985afab42d1e2a219054bae8ea1803cc1 /helpers/lh_chroot_hooks
parent67a0daf67130c29541ccfde5eda0ef4eaf6c3278 (diff)
downloadlive-build-58d6b235f955c9d8b7f8bd7c03360b712840b269.zip
live-build-58d6b235f955c9d8b7f8bd7c03360b712840b269.tar.gz
Fixing and unifying handling of hooks.
Diffstat (limited to 'helpers/lh_chroot_hooks')
-rwxr-xr-xhelpers/lh_chroot_hooks11
1 files changed, 4 insertions, 7 deletions
diff --git a/helpers/lh_chroot_hooks b/helpers/lh_chroot_hooks
index 6296b46..64a6526 100755
--- a/helpers/lh_chroot_hooks
+++ b/helpers/lh_chroot_hooks
@@ -43,7 +43,9 @@ Check_lockfile .lock
Create_lockfile .lock
# Processing hooks
-for HOOK in ${LH_PACKAGES_LISTS} ${LH_TASKS}
+HOOKS="$(echo ${LH_HOOKS} ${LH_PACKAGES_LISTS} ${LH_TASKS} | sed -e 's| |\n|g' | sort -u)"
+
+for HOOK in ${HOOKS}
do
if [ -f ${LH_BASE:-/usr/share/live-helper}/hooks/"${HOOK}" ]
then
@@ -57,7 +59,7 @@ do
fi
# Executing hook
- Chroot chroot "/root/${HOOK}"
+ Chroot chroot "./root/${HOOK}"
# Removing hook
rm -f chroot/root/"${HOOK}"
@@ -66,8 +68,3 @@ do
Create_stagefile .stage/chroot_hooks
fi
done
-
-if [ -n "${LH_HOOKS}" ] && [ "${LH_HOOKS}" != "none" ]
-then
- LH_DEBCONF_FRONTEND="readline" LH_DEBCONF_PRIORITY="low" LH_DEBCONF_NOWARNINGS="no" Chroot chroot "${LH_HOOKS}"
-fi