From f8cfc3c838e3fb738af6f53303a3486f1d08ab54 Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Mon, 4 Sep 2023 12:14:38 +1000 Subject: [PATCH] Avoid unmounting points below $LIVE using full pathname. --- overlay-boot | 1 + 1 file changed, 1 insertion(+) diff --git a/overlay-boot b/overlay-boot index 6577cad..899d53b 100755 --- a/overlay-boot +++ b/overlay-boot @@ -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" -- 2.39.2