diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-11 13:53:16 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-11 13:53:16 +0100 |
commit | f154d48b5fc0b2fffaf1b1d7a8b2c28dbac7df65 (patch) | |
tree | 7b50c8140b1cce2770d79818af9337bd2adcfdab /src/core | |
parent | 0df35eb24a7b7b12eba06eaf3bd17e1b233dc722 (diff) |
escape / in awk
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/libs/lib-blockdevices-filesystems.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index 6d8401c..89dc675 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -61,7 +61,8 @@ target_umountall() { infofy "Disabling all swapspace..." disks swapoff -a >/dev/null 2>&1 - for mountpoint in $(mount | awk "/\/$var_TARGET_DIR/ {print \$3}" | sort | tac ) + declare target=${var_TARGET_DIR//\//\\/} # escape all slashes otherwise awk complains + for mountpoint in $(mount | awk "/\/$target/ {print \$3}" | sort | tac ) do infofy "Unmounting mountpoint $mountpoint" disks umount $mountpoint >/dev/null 2>$LOG |