From: Ralph Ronnquist Date: Mon, 4 Sep 2023 02:14:38 +0000 (+1000) Subject: Avoid unmounting points below $LIVE using full pathname. X-Git-Tag: 0.1.14~2 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=f8cfc3c838e3fb738af6f53303a3486f1d08ab54;p=rrq%2Foverlay-boot.git Avoid unmounting points below $LIVE using full pathname. --- 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"