Support new rd_DASD parameter for s390 systems.
The new rd_DASD parameter allows dracut to handle multiple rd_DASD
options. One parameter per DASD. The syntax is:
rd_DASD=<device path>[,readonly=X][,erplog=X][,use_diag=X][,failfast=X]
The device path is a CCW device path, such as 0.0.0200. The optional
parameters are sysfs attributes for the DASD. The X value can be 0 or
1. Dracut will write out each of the rd_DASD settings to
/etc/dasd.conf and on bootup, the dasdconf.sh script will parse this
file and bring each DASD online with the specified attribute settings.
master
parent
fe32b77f87
commit
a790547896
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
arch=$(uname -m)
|
arch=$(uname -m)
|
||||||
[ "$arch" = "s390" -o "$arch" = "s390x" ] || exit 1
|
[ "$arch" = "s390" -o "$arch" = "s390x" ] || exit 1
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# config file syntax:
|
||||||
|
# deviceno sysfs_opts...
|
||||||
|
#
|
||||||
|
# Examples:
|
||||||
|
# 0.0.0203 readonly=1 failfast=1
|
||||||
|
# 0.0.0204
|
||||||
|
# 0.0.0205 erplog=1
|
||||||
|
|
||||||
|
CONFIG=/etc/dasd.conf
|
||||||
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||||
|
|
||||||
|
if [ -f "$CONFIG" ]; then
|
||||||
|
if [ ! -d /sys/bus/ccw/drivers/dasd-eckd ] && [ ! -d /sys/bus/ccw/drivers/dasd-fba ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
tr "A-Z" "a-z" < $CONFIG | while read line; do
|
||||||
|
case $line in
|
||||||
|
\#*) ;;
|
||||||
|
*)
|
||||||
|
[ -z "$line" ] && continue
|
||||||
|
set $line
|
||||||
|
DEVICE=$1
|
||||||
|
SYSFSPATH=
|
||||||
|
if [ -r "/sys/bus/ccw/drivers/dasd-eckd/$DEVICE" ]; then
|
||||||
|
SYSFSPATH="/sys/bus/ccw/drivers/dasd-eckd/$DEVICE"
|
||||||
|
elif [ -r "/sys/bus/ccw/drivers/dasd-fba/$DEVICE" ]; then
|
||||||
|
SYSFSPATH="/sys/bus/ccw/drivers/dasd-fba/$DEVICE"
|
||||||
|
else
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
echo 1 > $SYSFSPATH/online
|
||||||
|
shift
|
||||||
|
while [ ! -z "$1" ]; do
|
||||||
|
(
|
||||||
|
attribute="$1"
|
||||||
|
IFS="="
|
||||||
|
set $attribute
|
||||||
|
case "$1" in
|
||||||
|
readonly|use_diag|erplog|failfast)
|
||||||
|
if [ -r "$SYSFSPATH/$1" ]; then
|
||||||
|
echo $2 > $SYSFSPATH/$1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
)
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
echo
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
inst_hook cmdline 30 "$moddir/parse-dasd.sh"
|
inst_hook cmdline 30 "$moddir/parse-dasd.sh"
|
||||||
|
dracut_install tr
|
||||||
|
inst "$moddir/dasdconf.sh" /sbin/dasdconf.sh
|
||||||
|
inst /etc/dasd.conf
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
instmods dasd_mod dasd_eckd_mod dasd_fba_mod dasd_diag_mod
|
instmods dasd_mod dasd_eckd_mod dasd_fba_mod dasd_diag_mod
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[ -d /etc/modprobe.d ] || mkdir /etc/modprobe.d
|
for dasd_arg in $(getargs 'rd_DASD='); do
|
||||||
|
(
|
||||||
dasd_arg=$(getarg rd_DASD=)
|
IFS=","
|
||||||
if [ -n "$dasd_arg" ]; then
|
set $dasd_arg
|
||||||
echo "options dasd_mod dasd=$dasd_arg" >> /etc/modprobe.d/dasd.conf
|
echo "$@" >> /etc/dasd.conf
|
||||||
fi
|
)
|
||||||
unset dasd_arg
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue