From e9216547244c20f771ac81fcf74257e2df8371ef Mon Sep 17 00:00:00 2001 From: Junichi Uekawa Date: Sun, 27 May 2007 02:54:59 +0900 Subject: trap SIGHUP as well as EXIT. --- pbuilder | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'pbuilder') diff --git a/pbuilder b/pbuilder index 67f683b..a0a49fe 100755 --- a/pbuilder +++ b/pbuilder @@ -55,10 +55,10 @@ case "$1" in . /usr/lib/pbuilder/pbuilder-checkparams . /usr/lib/pbuilder/pbuilder-runhooks extractbuildplace - trap umountproc_cleanbuildplace exit + trap umountproc_cleanbuildplace exit sighup loadhooks recover_aptcache - trap saveaptcache_umountproc_cleanbuildplace exit + trap saveaptcache_umountproc_cleanbuildplace exit sighup if [ "${INTERNAL_BUILD_UML}" = "yes" ]; then echo " -> entering the shell" @@ -72,7 +72,7 @@ File extracted to: $BUILDPLACE save_aptcache - trap umountproc_cleanbuildplace exit + trap umountproc_cleanbuildplace exit sighup # saving the place afterwards if [ "${SAVE_AFTER_LOGIN}" = "yes" ]; then @@ -82,7 +82,7 @@ File extracted to: $BUILDPLACE echo " -> Saving the results, modifications to this session will persist" unloadhooks umountproc - trap cleanbuildplace exit + trap cleanbuildplace exit sighup ${CHROOTEXEC} /usr/bin/apt-get clean || true create_basetgz fi @@ -101,11 +101,11 @@ File extracted to: $BUILDPLACE fi; extractbuildplace - trap umountproc_cleanbuildplace exit + trap umountproc_cleanbuildplace exit sighup loadhooks recover_aptcache - trap saveaptcache_umountproc_cleanbuildplace exit + trap saveaptcache_umountproc_cleanbuildplace exit sighup RUNNAME="$BUILDPLACE/run" cat "$EXECPROGRAM" > "$RUNNAME" @@ -115,7 +115,7 @@ File extracted to: $BUILDPLACE rm -f "$RUNNAME" save_aptcache - trap umountproc_cleanbuildplace exit + trap umountproc_cleanbuildplace exit sighup # saving the place afterwards if [ "${SAVE_AFTER_LOGIN}" = "yes" ]; then @@ -125,7 +125,7 @@ File extracted to: $BUILDPLACE echo " -> Saving the results, modifications to this session will persist" unloadhooks umountproc - trap cleanbuildplace exit + trap cleanbuildplace exit sighup ${CHROOTEXEC} /usr/bin/apt-get clean || true create_basetgz fi @@ -136,7 +136,7 @@ File extracted to: $BUILDPLACE . /usr/lib/pbuilder/pbuilder-checkparams . /usr/lib/pbuilder/pbuilder-runhooks extractbuildplace - trap umountproc_cleanbuildplace exit + trap umountproc_cleanbuildplace exit sighup loadhooks executehooks "F" echo " -> start dump config" -- cgit v1.2.3