Skip to content

Commit

Permalink
Fix umount
Browse files Browse the repository at this point in the history
Only unmount mount points starting but not equal to the root.

Fix alpinelinux#30
  • Loading branch information
douglas-raillard-arm committed Oct 12, 2021
1 parent c0a82eb commit 64a2b05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alpine-chroot-install
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ gen_destroy_script() {
[ "$(id -u)" -eq 0 ] || _sudo='sudo'
# Unmounts all filesystem under the specified directory tree.
cat /proc/mounts | cut -d' ' -f2 | grep "^$SCRIPT_DIR" | sort -r | while read path; do
cat /proc/mounts | cut -d' ' -f2 | grep "^$SCRIPT_DIR." | sort -r | while read path; do
echo "Unmounting $path" >&2
$_sudo umount -fn "$path" || exit 1
done
Expand Down

0 comments on commit 64a2b05

Please sign in to comment.