diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:51 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:18:29 +0100 |
commit | 8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1 (patch) | |
tree | 621dc56a00a65ab0eb1fd4e7d42ad4e45d718741 /helpers/lh_chroot_hooks | |
parent | 4739146fc6c4de8b16418517bb882312c475195c (diff) | |
download | live-build-8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1.zip live-build-8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1.tar.gz |
Adding live-helper 1.0~a7-1.
Diffstat (limited to 'helpers/lh_chroot_hooks')
-rwxr-xr-x | helpers/lh_chroot_hooks | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/helpers/lh_chroot_hooks b/helpers/lh_chroot_hooks index d2fac35..7963193 100755 --- a/helpers/lh_chroot_hooks +++ b/helpers/lh_chroot_hooks @@ -46,26 +46,29 @@ Check_lockfile .lock Create_lockfile .lock # Processing hooks -if [ -n "${LIVE_PACKAGES_LISTS}" ] && [ -f /usr/share/live-helper/hooks/"${LIVE_PACKAGES_LISTS}" ] -then - # Copying hook - cp /usr/share/live-helper/hooks/"${LIVE_PACKAGES_LISTS}" chroot/root - - # Making hook executable - if [ ! -x chroot/root/${LIVE_PACKAGES_LISTS} ] +for HOOK in ${LIVE_PACKAGES_LISTS} ${LIVE_TASKS} +do + if [ -f /usr/share/live-helper/hooks/"${HOOK}" ] then - chmod +x chroot/root/${LIVE_PACKAGES_LISTS} - fi + # Copying hook + cp /usr/share/live-helper/hooks/"${HOOK}" chroot/root - # Executing hook - Chroot "/root/${LIVE_PACKAGES_LISTS}" + # Making hook executable + if [ ! -x chroot/root/"${HOOK}" ] + then + chmod +x chroot/root/"${HOOK}" + fi - # Removing hook - rm -f chroot/root/"${LIVE_PACKAGE_LIST}" + # Executing hook + Chroot "/root/${HOOK}" - # Creating stage file - Create_stagefile .stage/chroot_hooks -fi + # Removing hook + rm -f chroot/root/"${HOOK}" + + # Creating stage file + Create_stagefile .stage/chroot_hooks + fi +done if [ -n "${LIVE_HOOKS}" ] then |