summaryrefslogtreecommitdiffstats
path: root/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'hooks')
-rw-r--r--hooks/encrypt3
-rw-r--r--hooks/lvm22
-rw-r--r--hooks/raid4
3 files changed, 6 insertions, 3 deletions
diff --git a/hooks/encrypt b/hooks/encrypt
index 4992270..30dfc12 100644
--- a/hooks/encrypt
+++ b/hooks/encrypt
@@ -4,8 +4,9 @@
run_hook ()
{
mkdevice () { /bin/mknod "/dev/mapper/control" c ${1} ${2}; }
+
+ /bin/modprobe -a -q dm-crypt >/dev/null 2>&1
if [ -e "/sys/class/misc/device-mapper" ]; then
- /bin/modprobe -a -q dm-crypt >/dev/null 2>&1
read dev_t < /sys/class/misc/device-mapper/dev
OLDIFS=$IFS; IFS=:
mkdevice $dev_t
diff --git a/hooks/lvm2 b/hooks/lvm2
index a1788ce..1eaae9a 100644
--- a/hooks/lvm2
+++ b/hooks/lvm2
@@ -3,8 +3,8 @@ run_hook ()
{
mkdevice () { /bin/mknod "/dev/mapper/control" c ${1} ${2}; }
+ /bin/modprobe -q dm-mod >/dev/null 2>&1
if [ -e "/sys/class/misc/device-mapper" ]; then
- /bin/modprobe -q dm-mod >/dev/null 2>&1
read dev_t < /sys/class/misc/device-mapper/dev
OLDIFS=$IFS; IFS=:
mkdevice $dev_t
diff --git a/hooks/raid b/hooks/raid
index 5cf4b2f..f234734 100644
--- a/hooks/raid
+++ b/hooks/raid
@@ -3,5 +3,7 @@ run_hook ()
{
#TODO scan for these somehow...
/bin/modprobe -aq raid0 raid1 raid2 raid5 raid6 >/dev/null 2>&1
- /bin/mdassemble ${md} ${raid}
+ # md= can be specified multiple times. The simplistic commandline
+ # parsing does not handle this, so we will let mdassemble parse it
+ /bin/mdassemble ${CMDLINE}
}