From 06f880229b8f632cbfa699c7af9beee13d0dddea Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 16 Feb 2009 12:34:55 +0100 Subject: MODULES=dep fix for minor partitions > 9 always remove the largest possible suffix pattern on the block device. (closes: #513958) Reported-by: Nicola Canepa --- hook-functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hook-functions') 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 -- cgit v1.2.3