diff options
author | martin f. krafft <madduck@debian.org> | 2007-09-29 20:53:06 +0100 |
---|---|---|
committer | martin f. krafft <madduck@madduck.net> | 2007-10-09 00:10:46 +0100 |
commit | 257481d036a3a0f4f77546d0774f2cea874efadc (patch) | |
tree | add0044b0eef98d391c1838ce80db8ff308f3099 /debian/initramfs | |
parent | 263c8938f4b6655a6423ac5add317a1d436be6b0 (diff) |
handle module name synonyms in initramfs script (#432585)
mdadm's initramfs hook script previously expected module names to be of the
form raidX and ignored synonyms, like X, which other parts of mdadm treat
just fine. This patch maps the synonyms to the module names to use.
Closes Debian bug #432585
Diffstat (limited to 'debian/initramfs')
-rw-r--r-- | debian/initramfs/hook | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/debian/initramfs/hook b/debian/initramfs/hook index 3a66501d..f08c1e26 100644 --- a/debian/initramfs/hook +++ b/debian/initramfs/hook @@ -252,8 +252,14 @@ if [ "$INITRDSTART" != none ] && [ -n "$devpairs" ]; then echo "MD_DEVS='$devs'" >> $DESTCONFIG fi - # raid4 is handled by raid5 - modules="$(echo $levels | sed -e 's,raid4,raid5,g')" + # handle module synonyms + modules="$(echo $levels \ + | sed -re 's,\<[[:digit:]]+\>,raid&,g; # prefix digits with raid + s,stripe,raid0,g; # striping is raid0 + s,mirror,raid1,g; # mirroring is raid1 + s,raid4,raid5,g; # use raid5 to handle raid4 + s,mp,multipath,g # mp is multipath + ')" # if raid456 module is present, use it for raid[456] modprobe --set-version="$version" --show-depends raid456 >/dev/null 2>&1 \ |