From 8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 23 Sep 2007 10:04:51 +0200 Subject: Adding live-helper 1.0~a7-1. --- helpers/lh_chroot_hooks | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'helpers/lh_chroot_hooks') 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 -- cgit v1.2.3