From 5e1558ae35d81f023c35c3102db98017aef8c88a Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 5 Dec 2012 23:27:29 +0100 Subject: use fuser elsewhere --- bin/d-i_builds.sh | 2 ++ bin/housekeeping.sh | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'bin') diff --git a/bin/d-i_builds.sh b/bin/d-i_builds.sh index 516f427a..3ad8e02b 100755 --- a/bin/d-i_builds.sh +++ b/bin/d-i_builds.sh @@ -36,6 +36,8 @@ export TMPFILE=$(mktemp -u) export CTMPFILE=$CHROOT_TARGET/$TMPFILE cleanup_all() { + # List the processes using the partition + fuser -mv $CHROOT_TARGET # test if $CHROOT_TARGET starts with /chroots/ if [ "${CHROOT_TARGET:0:9}" != "/chroots/" ] ; then echo "HALP. CHROOT_TARGET = $CHROOT_TARGET" diff --git a/bin/housekeeping.sh b/bin/housekeeping.sh index 47882531..c146b60d 100755 --- a/bin/housekeeping.sh +++ b/bin/housekeeping.sh @@ -23,6 +23,7 @@ done echo vnstat + CHROOT_PATTERN="/chroots/chroot-tests-*" HOUSE=$(ls $CHROOT_PATTERN 2>/dev/null) if [ "$HOUSE" != "" ] ; then @@ -31,6 +32,9 @@ if [ "$HOUSE" != "" ] ; then echo "Probably manual cleanup needed:" echo echo "$ ls -la $CHROOT_PATTERN" + # List the processes using the partition + echo + fuser -mv $CHROOT_TARGET echo $HOUSE exit 1 fi -- cgit v1.2.3-54-g00ecf