diff options
Diffstat (limited to 'hosts/jenkins')
3 files changed, 14 insertions, 6 deletions
diff --git a/hosts/jenkins/etc/pbuilder/rebuild-hooks/B01_cleanup b/hosts/jenkins/etc/pbuilder/rebuild-hooks/B01_cleanup index df37129c..f8c545ae 100755 --- a/hosts/jenkins/etc/pbuilder/rebuild-hooks/B01_cleanup +++ b/hosts/jenkins/etc/pbuilder/rebuild-hooks/B01_cleanup @@ -6,5 +6,7 @@ set -e [ "$(readlink /proc/1/ns/uts)" = "$(readlink /proc/self/ns/uts)" ] && exit 0 # cease using disorderfs -sudo -u pbuilder2 fusermount -u /tmp/buildd -mv /tmp/disorderfs /tmp/buildd +if [ -d /tmp/disorderfs ] ; then + sudo -u pbuilder2 fusermount -u /tmp/buildd + mv /tmp/disorderfs /tmp/buildd +fi diff --git a/hosts/jenkins/etc/pbuilder/rebuild-hooks/C01_cleanup b/hosts/jenkins/etc/pbuilder/rebuild-hooks/C01_cleanup index df37129c..f8c545ae 100755 --- a/hosts/jenkins/etc/pbuilder/rebuild-hooks/C01_cleanup +++ b/hosts/jenkins/etc/pbuilder/rebuild-hooks/C01_cleanup @@ -6,5 +6,7 @@ set -e [ "$(readlink /proc/1/ns/uts)" = "$(readlink /proc/self/ns/uts)" ] && exit 0 # cease using disorderfs -sudo -u pbuilder2 fusermount -u /tmp/buildd -mv /tmp/disorderfs /tmp/buildd +if [ -d /tmp/disorderfs ] ; then + sudo -u pbuilder2 fusermount -u /tmp/buildd + mv /tmp/disorderfs /tmp/buildd +fi diff --git a/hosts/jenkins/etc/pbuilder/rebuild-hooks/D01_modify_environment b/hosts/jenkins/etc/pbuilder/rebuild-hooks/D01_modify_environment index da5f86c6..68364908 100755 --- a/hosts/jenkins/etc/pbuilder/rebuild-hooks/D01_modify_environment +++ b/hosts/jenkins/etc/pbuilder/rebuild-hooks/D01_modify_environment @@ -13,5 +13,9 @@ echo "I: Adding a custom variable just for the fun of it..." >&2 export CAPTURE_ENVIRONMENT="I capture the environment" # use disorderfs, mount it as user -mv /tmp/buildd /tmp/disorderfs -sudo -u pbuilder2 disorderfs /tmp/disorderfs /tmp/buildd +if [ -x /usr/bin/disorderfs ] ; then + mv /tmp/buildd /tmp/disorderfs + sudo -u pbuilder2 disorderfs /tmp/disorderfs /tmp/buildd +else + echo "Warning: disorderfs not available." +fi |