Avoid unmounting points below $LIVE using full pathname.
authorRalph Ronnquist <rrq@rrq.au>
Mon, 4 Sep 2023 02:14:38 +0000 (12:14 +1000)
committerRalph Ronnquist <rrq@rrq.au>
Mon, 4 Sep 2023 02:14:38 +0000 (12:14 +1000)
overlay-boot

index 6577cadf387a658b182b8a928ee257ab3274f9cb..899d53ba25f3f9310041462df7d84ce06d9a3307 100755 (executable)
@@ -37,6 +37,7 @@ trap "exithandler" 0
 # including "/" as well) and "/proc".
 sort -rk2,2 < /proc/mounts | while read D P A2 ; do
     beginswith "$P" "$LIVE" && continue
+    beginswith "$P" "$(realpath $LIVE)" && continue
     beginswith "/run/netns/$NAME" "$P" && continue
     [ "$P" = /proc ] && continue
     umount "$P"