[pve-devel] [PATCH installer 2/6] umount testdir recursively in check-* and clean

Stoiko Ivanov s.ivanov at proxmox.com
Fri Nov 29 11:53:44 CET 2019


recursively unmount testdir before removing it. This prevents the subsequent
call to try to remove files in potentially still bindmounted /proc, /sys, /dev
filesystems.

Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index 1ca2972..95861d8 100644
--- a/Makefile
+++ b/Makefile
@@ -64,22 +64,26 @@ upload-pve: ${PVE_DEB}
 	truncate -s 2G $@
 
 check-pve: ${PVE_DEB} test.img
+	umount -Rd testdir || true
 	rm -rf testdir
 	dpkg -X ${PVE_DEB} testdir
 	G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img
 
 check-pve-multidisks: ${PVE_DEB} test.img test2.img test3.img test4.img
+	umount -Rd testdir || true
 	rm -rf testdir
 	dpkg -X ${PVE_DEB} testdir
 	G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img,test2.img,test3.img,test4.img
 
 check-pmg: ${PMG_DEB} test.img
+	umount -Rd testdir || true
 	rm -rf testdir
 	dpkg -X ${PMG_DEB} testdir
 	G_SLICE=always-malloc perl -I testdir/usr/share/perl5 testdir/usr/bin/proxinstall -t test.img
 
 .phony: clean
 clean:
+	umount -Rd testdir || true
 	make -C html-common clean
 	rm -rf *~ *.deb target build packages packages.tmp testdir test*.img pve-final.pkglist *.buildinfo *.changes country.dat final.pkglist
 	find . -name '*~' -exec rm {} ';'
-- 
2.20.1





More information about the pve-devel mailing list