diff options
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 d2fac3591..796319382 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 |