summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-12-16 22:09:06 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-12-16 22:09:06 +0100
commitfa4e07306d545859fb6c8c708c51a4d12d964123 (patch)
tree28bf47aa1a82d3104b2ca4bfbf407bd7e783b47f /src
parent54b3b2fd354442dd5f4c0d21818b6ea3d8be50af (diff)
fix for recursive deletes
Diffstat (limited to 'src')
-rw-r--r--src/core/libs/lib-ui-interactive.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index c1ceb3e..51133e9 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -405,8 +405,9 @@ remove_blockdevice ()
local part_label=$3 # must be given
target="$part $part_type $part_label"
- declare target_escaped=${target//\//\\/} # note: apparently no need to escape the '+' sign
- fs_string=`awk "/^$target_escaped / { print \$4}" $TMP_BLOCKDEVICES`
+ declare target_escaped=${target//\//\\/} # note: apparently no need to escape the '+' sign for sed.
+ declare target_escawk=${target_escaped/+/\\+} # ...but that doesn't cound for awk
+ fs_string=`awk "/^$target_escawk / { print \$4}" $TMP_BLOCKDEVICES`
debug "Cleaning up partition $part (type $part_type, label $part_label). It has the following FS's on it: $fs_string"
sed -i "/$target_escaped/d" $TMP_BLOCKDEVICES || show_warning "blockdevice removal" "Could not remove partition $part (type $part_type, label $part_label). This is a bug. please report it"
for fs in `sed 's/|/ /g' <<< $fs_string`