summaryrefslogtreecommitdiffstats
path: root/hosts/jenkins/etc/pbuilder/rebuild-hooks/C01_cleanup
blob: f8c545aebf73a941e86e57f35124e17d0cfffffb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/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
	sudo -u pbuilder2 fusermount -u /tmp/buildd
	mv /tmp/disorderfs /tmp/buildd
fi