From 60ee574a496cad00f61256154df35ad4df2dd82b Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 5 Mar 2012 12:20:18 +0000 Subject: setup-disk: fix unmount logic we need anchor on both sides. Thanks to Jim Pryor for pointing this out. --- setup-disk.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setup-disk.in') diff --git a/setup-disk.in b/setup-disk.in index f265a28..e34e683 100644 --- a/setup-disk.in +++ b/setup-disk.in @@ -297,7 +297,7 @@ unmount_partitions() { local mnt="$1" # unmount the partitions - umount $(awk '{print $2}' /proc/mounts | grep ^"$mnt" | sort -r) + umount $(awk '{print $2}' /proc/mounts | egrep "^$mnt(/|\$)" | sort -r) } # figure out decent default swap size in mega bytes -- cgit v1.2.3