From 8e56a9cb7ac466f1aa319bd5d82d550f825707b0 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 25 Oct 2012 16:50:15 +0200 Subject: [PATCH] finally, trap sudo --- liveboot_build.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/liveboot_build.sh b/liveboot_build.sh index 9babfee..66b87bb 100755 --- a/liveboot_build.sh +++ b/liveboot_build.sh @@ -9,6 +9,7 @@ set_failure() { exit 1 } +set -x export if [ "$REQUEST_ID" = "" ] ; then @@ -48,9 +49,11 @@ trap set_failure INT TERM EXIT ERR KILL STOP HUP ABRT # # build liveboot -# -sudo pbuilder --execute --bindmounts /srv/build/ -- $BUILD_SCRIPT -rm $BUILD_SCRIPT +# (sudo is called from within a(nother) script as it's not possible to trap sudo directly +# +echo "sudo pbuilder --execute --bindmounts /srv/build/ -- $BUILD_SCRIPT" > ${BUILD_SCRIPT}_sudo +bash -x ${BUILD_SCRIPT}_sudo +rm $BUILD_SCRIPT ${BUILD_SCRIPT}_sudo # # add liveboot build result to cidb -- 2.39.5