diff options
-rw-r--r-- | setup-disk.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/setup-disk.in b/setup-disk.in index 0f05b74..ca586ba 100644 --- a/setup-disk.in +++ b/setup-disk.in @@ -57,8 +57,8 @@ enumerate_fstab() { local mnt="$1" local fs_spec= fs_file= fs_vfstype= fs_mntops= fs_freq= fs_passno= [ -z "$mnt" ] && return - local escaped_mnt=$(echo $mnt | sed 's:/:\\/:g') - awk "\$2 ~ /^$escaped_mnt/ {print \$0}" /proc/mounts | \ + local escaped_mnt=$(echo $mnt | sed -e 's:/*$::' -e 's:/:\\/:g') + awk "\$2 ~ /^$escaped_mnt(\/|\$)/ {print \$0}" /proc/mounts | \ sed "s:$mnt:/:g; s: :\t:g" | sed 's:/\+:/:g' | \ while read fs_spec fs_file fs_vfstype fs_mntops fs_freq fs_passno; do echo -e "$(uuid_or_device $fs_spec)\t${fs_file}\t${fs_vfstype}\t${fs_mntops} ${fs_freq} ${fs_passno}" |