From 799d4bfb31c279b72088c8ee8a16c2710ab8a309 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 23 Sep 2007 10:04:48 +0200 Subject: Adding live-helper 1.0~a3-1. --- helpers/lh_chroot_hooks | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'helpers/lh_chroot_hooks') diff --git a/helpers/lh_chroot_hooks b/helpers/lh_chroot_hooks index d6558256a..47dea53c3 100755 --- a/helpers/lh_chroot_hooks +++ b/helpers/lh_chroot_hooks @@ -1,6 +1,11 @@ #!/bin/sh # lh_chroot_hooks(1) - execute hooks in chroot +# Copyright (C) 2006-2007 Daniel Baumann +# +# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +# This is free software, and you are welcome to redistribute it +# under certain conditions; see COPYING for details. set -e @@ -10,6 +15,13 @@ do . ${FUNCTION} done +# Set static variables +DESCRIPTION="execute hooks in chroot" +HELP="" +USAGE="${PROGRAM} [--force]" + +Arguments "${@}" + # Reading configuration files Read_conffile config/common Read_conffile config/chroot @@ -28,19 +40,19 @@ Check_lockfile .lock Create_lockfile .lock # Processing hooks -if [ -n "${LIVE_PACKAGES_LIST}" ] && [ -f /usr/share/live-helper/hooks/"${LIVE_PACKAGES_LIST}" ] +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_LIST}" chroot/root + cp /usr/share/live-helper/hooks/"${LIVE_PACKAGES_LISTS}" chroot/root # Making hook executable - if [ ! -x chroot/root/${LIVE_PACKAGES_LIST} ] + if [ ! -x chroot/root/${LIVE_PACKAGES_LISTS} ] then - chmod +x chroot/root/${LIVE_PACKAGES_LIST} + chmod +x chroot/root/${LIVE_PACKAGES_LISTS} fi # Executing hook - Chroot "/root/${LIVE_PACKAGES_LIST}" + Chroot "/root/${LIVE_PACKAGES_LISTS}" # Removing hook rm -f chroot/root/"${LIVE_PACKAGE_LIST}" -- cgit v1.2.3