From 28dbf57aefc251e2a75ce99e85cdef82dbbd385a Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 19 Dec 2012 10:42:32 +0100 Subject: use right mountpoint for umount call and always use umount -l --- bin/g-i-installation.sh | 6 ++++-- etc/sudoers.d/jenkins | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh index 0660faf4..5cc50788 100755 --- a/bin/g-i-installation.sh +++ b/bin/g-i-installation.sh @@ -96,7 +96,7 @@ cleanup_all() { # # cleanup # - sudo umount $IMAGE_MNT + sudo umount -l $IMAGE_MNT } show_preseed() { @@ -362,7 +362,9 @@ case $JOB_NAME in # kill qemu and image # sudo kill -9 $(ps fax | grep [q]emu-system | grep ${NAME}_preseed.cfg 2>/dev/null | awk '{print $1}') || true - if [ ! -z $IMAGE ] ; then sudo umount -l $IMAGE ; fi + if [ ! -z $IMAGE ] ; then + sudo umount -l $IMAGE_MNT || true + fi boot_system monitor_system normal ;; diff --git a/etc/sudoers.d/jenkins b/etc/sudoers.d/jenkins index 05cdcf84..3f4253e7 100644 --- a/etc/sudoers.d/jenkins +++ b/etc/sudoers.d/jenkins @@ -1,4 +1,4 @@ -jenkins ALL= NOPASSWD: /usr/sbin/debootstrap *, NOPASSWD: /usr/sbin/chroot /chroots/*, NOPASSWD: /bin/rm -rf --one-file-system /chroots/*, NOPASSWD: /bin/umount -l /chroots/*, NOPASSWD: /bin/umount /media/*, /bin/mount -o loop*, NOPASSWD: /usr/bin/du *, NOPASSWD: /bin/kill -9 *, NOPASSWD: /usr/bin/qemu-system-x86_64 *, NOPASSWD: /bin/mkdir -p /media/*, SETENV: NOPASSWD: /usr/sbin/pbuilder * +jenkins ALL= NOPASSWD: /usr/sbin/debootstrap *, NOPASSWD: /usr/sbin/chroot /chroots/*, NOPASSWD: /bin/rm -rf --one-file-system /chroots/*, NOPASSWD: /bin/umount -l /chroots/*, NOPASSWD: /bin/umount -l /media/*, /bin/mount -o loop*, NOPASSWD: /usr/bin/du *, NOPASSWD: /bin/kill -9 *, NOPASSWD: /usr/bin/qemu-system-x86_64 *, NOPASSWD: /bin/mkdir -p /media/*, SETENV: NOPASSWD: /usr/sbin/pbuilder * # keep these environment variables Defaults env_keep += "http_proxy", env_reset -- cgit v1.2.3-70-g09d2