]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Use the right argument for dasd module options
authorJesse Keating <jkeating@redhat.com>
Tue, 15 May 2012 20:42:47 +0000 (13:42 -0700)
committerJesse Keating <jkeating@redhat.com>
Mon, 21 May 2012 21:19:00 +0000 (14:19 -0700)
The legacy argument is DASD=, and the new arguments should be the same
as the arguments for populating dasd.conf.  If multiple arguments are
passed we can stack them by inserting a ',' between them.

modules.d/95dasd_mod/parse-dasd-mod.sh

index b55015689061fe74e15c61bca995f5f7d9447c66..d7e8664f5d20a8162ebee39a87479712486b51a6 100755 (executable)
@@ -1,12 +1,20 @@
 #!/bin/sh
 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
 # ex: ts=8 sw=4 sts=4 et filetype=sh
-[ -d /etc/modprobe.d ] || mkdir -m 0755 -p /etc/modprobe.d
+mod_args=""
+for dasd_arg in $(getargs rd.dasd= rd_DASD= DASD=); do
+    if [ -z $mod_args ]; then
+        mod_args="$dasd_arg"
+    else
+        # We've already got some thing in mod_args, add to it
+        mod_args="$mod_args,$dasd_arg"
+    fi
+done
 
-dasd_arg=$(getarg rd.dasd_mod.dasd rd_DASD_MOD=)
-if [ -n "$dasd_arg" ]; then
-    echo "options dasd_mod dasd=$dasd_arg" >> /etc/modprobe.d/dasd_mod.conf
+if [ ! -z $mod_args ]; then
+    [ -d /etc/modprobe.d ] || mkdir -m 0755 -p /etc/modprobe.d
+    echo "options dasd_mod dasd=$mod_args" >> /etc/modprobe.d/dasd_mod.conf
 fi
-unset dasd_arg
 
+unset dasd_arg
 dasd_cio_free