From 2005367e695121b8bfd590a6f791dfe3975d3d74 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Mon, 15 Dec 2008 18:52:44 +0100 Subject: fix for rollback looping only once. Thank you bash faq http://wooledge.org:8000/BashFAQ/024 --- src/core/libs/lib-blockdevices-filesystems.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index 174aa23..99fac02 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -503,7 +503,7 @@ rollback_filesystems () for i in `seq 1 10` do open_items=0 - egrep '\+|mapper' $TMP_BLOCKDEVICES | while read part part_type part_label fs_string # $fs_string can be ignored. TODO: improve regex + while read part part_type part_label fs_string # $fs_string can be ignored do real_part=${part/+/} if [ "$part_type" = dm_crypt ] # Can be in use for: lvm-pv or raw. we don't need to care about raw (it will be unmounted so it can be destroyed) @@ -591,7 +591,7 @@ rollback_filesystems () else die_error "Unrecognised partition type $part_type for partition $part. This should never happen. please report this" fi - done + done < <(egrep '\+|mapper' $TMP_BLOCKDEVICES) #TODO: improve regex [ $open_items -eq 0 ] && break done -- cgit v1.2.3-54-g00ecf