[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] schroot-create: findmnt doesn't really work the way I'd like it to

Mattia Rizzolo gitlab at salsa.debian.org
Sun Aug 23 07:42:36 BST 2020



Mattia Rizzolo pushed to branch master at Debian QA / jenkins.debian.net


Commits:
8139f77f by Mattia Rizzolo at 2020-08-23T08:42:25+02:00
schroot-create: findmnt doesn't really work the way I'd like it to

it doesn't list all mountpoints under a directory, but only if that directory matches a current mountpoint, apparently

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -


1 changed file:

- bin/schroot-create.sh


Changes:

=====================================
bin/schroot-create.sh
=====================================
@@ -56,7 +56,7 @@ cleanup() {
 	cd
 	if [ -d "$SCHROOT_TARGET" ]; then
 		local i
-		for i in $(findmnt -l -c | awk '{print $1}' | grep "^$SCHROOT_TARGET"); do
+		for i in $(mount | awk '{print $3}' | grep "^$(realpath "$SCHROOT_TARGET")"); do
 			sudo umount "$i"
 		done
 		sudo rm -rf --one-file-system "$SCHROOT_TARGET" || ( echo "Warning: $SCHROOT_TARGET could not be fully removed during cleanup." ; ls "$SCHROOT_TARGET" -la )



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/8139f77fca6f4e31ac4adda3270020da0312b680

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/8139f77fca6f4e31ac4adda3270020da0312b680
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20200823/d9d85536/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list