diff options
-rwxr-xr-x | bin/live-build.sh | 17 | ||||
-rw-r--r-- | etc/sudoers.d/jenkins | 1 |
2 files changed, 11 insertions, 7 deletions
diff --git a/bin/live-build.sh b/bin/live-build.sh index 86135829..337185e8 100755 --- a/bin/live-build.sh +++ b/bin/live-build.sh @@ -8,24 +8,27 @@ DEBUG=false common_init "$@" cleanup_all() { - rm -r $TMPDIR + sudo rm -rf --one-file-system $TMPDIR } TMPDIR=$(mktemp --tmpdir=/srv/live-build -d) trap cleanup_all INT TERM EXIT cd $TMPDIR -# build an debian-edu .iso for now... -# $1 is debian-edu + +# $1 is used for the hostname and username # $2 is standalone... -# FIXME: do debian images too -lb config --distribution jessie --bootappend-live "boot=live config hostname=debian-edu username=debian-edu" -echo education-standalone > config/package-lists/live.list.chroot +lb config --distribution jessie --bootappend-live "boot=live config hostname=$1 username=$1" +case "$2" in + standalone) echo education-standalone > config/package-lists/live.list.chroot + ;; + *) ;; +esac lb build ls -la *.iso || true mkdir -p /srv/live-build/results cp *.iso /srv/live-build/results -# FIXME: use subdir there... (shared with downloaded .isos?) +# FIXME: use proper filenames cleanup_all trap - INT TERM EXIT diff --git a/etc/sudoers.d/jenkins b/etc/sudoers.d/jenkins index d3356045..c1c86ec7 100644 --- a/etc/sudoers.d/jenkins +++ b/etc/sudoers.d/jenkins @@ -9,6 +9,7 @@ jenkins ALL= \ /bin/ls -la /media/*, \ /bin/rm -rf --one-file-system /chroots/*, \ /bin/rm -rf --one-file-system /schroots/*, \ + /bin/rm -rf --one-file-system /srv/live-build/*, \ /bin/mv /chroots/* /schroots/*, \ /bin/mv /schroots/* /schroots/*, \ /bin/umount -l /chroots/*, \ |