From b2af898af134153bb1b6a9da96693a4092a896ca Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 23 Sep 2015 00:27:29 +0200 Subject: reproducible: use disorderfs on every 2nd build --- .../etc/pbuilder/rebuild-hooks/C01_cleanup | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 hosts/profitbricks-build1-amd64/etc/pbuilder/rebuild-hooks/C01_cleanup (limited to 'hosts/profitbricks-build1-amd64/etc/pbuilder/rebuild-hooks/C01_cleanup') diff --git a/hosts/profitbricks-build1-amd64/etc/pbuilder/rebuild-hooks/C01_cleanup b/hosts/profitbricks-build1-amd64/etc/pbuilder/rebuild-hooks/C01_cleanup new file mode 100755 index 00000000..c60a991c --- /dev/null +++ b/hosts/profitbricks-build1-amd64/etc/pbuilder/rebuild-hooks/C01_cleanup @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +# exit if we are in the same UTS namespace as init ( != 2nd build ) +[ "$(readlink /proc/1/ns/uts)" = "$(readlink /proc/self/ns/uts)" ] && exit 0 + +# cease using disorderfs +if [ -d /tmp/disorderfs ] ; then + echo -n "Unmounting /tmp/disorderfs…" + fusermount -u /tmp/buildd + rmdir /tmp/buildd + mv /tmp/disorderfs /tmp/buildd + echo " done." +fi -- cgit v1.2.3-70-g09d2