summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2009-02-16 12:34:55 +0100
committermaximilian attems <maks@debian.org>2009-02-16 12:34:55 +0100
commit06f880229b8f632cbfa699c7af9beee13d0dddea (patch)
treebf1b23f403f0567fdd6b170304572df726202359
parent8d21dcff7cef34c4f9a854deebdabb02503a3dae (diff)
downloadinitramfs-tools-06f880229b8f632cbfa699c7af9beee13d0dddea.tar.gz
initramfs-tools-06f880229b8f632cbfa699c7af9beee13d0dddea.zip
MODULES=dep fix for minor partitions > 9
always remove the largest possible suffix pattern on the block device. (closes: #513958) Reported-by: Nicola Canepa <canne74@gmail.com>
-rw-r--r--hook-functions4
1 files changed, 2 insertions, 2 deletions
diff --git a/hook-functions b/hook-functions
index f9e5bc7..0ddfcec 100644
--- a/hook-functions
+++ b/hook-functions
@@ -259,7 +259,7 @@ dep_add_modules()
block=$(awk "/^${block}/{print substr(\$5, 1, 4); exit}" \
/proc/mdstat)
fi
- block=${block%[0-9]*}
+ block=${block%%[0-9]*}
# md root new naming scheme /dev/md/X
elif [ "${root#/dev/md/}" != "${root}" ]; then
root=${root#/dev/md/}
@@ -286,7 +286,7 @@ dep_add_modules()
# classical root device
else
block=${root#/dev/}
- block=${block%[0-9]*}
+ block=${block%%[0-9]*}
fi
# Error out if /sys lack block dev