summaryrefslogtreecommitdiff
path: root/modules.d/95dasd
diff options
context:
space:
mode:
authorDan Horák <dan@danny.cz>2009-11-12 14:44:25 +0100
committerHarald Hoyer <harald@redhat.com>2009-11-12 15:56:58 +0100
commit200e59149ced1ae0bcb1b04db97e972b4c8bb40a (patch)
tree9a5cb4809142054f3bc84339bb9557bd2e668912 /modules.d/95dasd
parent978d78f7b24ab2945fb8afcd7779d18ed8044be4 (diff)
downloaddracut-200e59149ced1ae0bcb1b04db97e972b4c8bb40a.tar.gz
dracut-200e59149ced1ae0bcb1b04db97e972b4c8bb40a.tar.bz2
dracut-200e59149ced1ae0bcb1b04db97e972b4c8bb40a.zip
move dasd initialization script and rules to s390utils
The primary source for dasd initialization script and udev rules is now in s390utils package. The s390utils-base subpackage, that carries the required files, is always installed on s390/s390x, because it's part of the Core group in comps. Signed-off-by: Dan Horák <dan@danny.cz>
Diffstat (limited to 'modules.d/95dasd')
-rw-r--r--modules.d/95dasd/56-dasd.rules16
-rwxr-xr-xmodules.d/95dasd/dasdconf.sh94
-rwxr-xr-xmodules.d/95dasd/install4
3 files changed, 2 insertions, 112 deletions
diff --git a/modules.d/95dasd/56-dasd.rules b/modules.d/95dasd/56-dasd.rules
deleted file mode 100644
index 5364935a..00000000
--- a/modules.d/95dasd/56-dasd.rules
+++ /dev/null
@@ -1,16 +0,0 @@
-ACTION=="add", SUBSYSTEM=="drivers", KERNEL=="dasd-eckd", RUN+="/sbin/dasdconf.sh"
-ACTION=="add", SUBSYSTEM=="drivers", KERNEL=="dasd-fba", RUN+="/sbin/dasdconf.sh"
-
-# This list should be autogenerated with "modinfo dasd_{eckd,fba}_mod"
-ACTION=="add", SUBSYSTEM=="ccw", ATTR{modalias}=="ccw:t1750m*dt3380dm*", RUN+="/sbin/dasdconf.sh"
-ACTION=="add", SUBSYSTEM=="ccw", ATTR{modalias}=="ccw:t1750m*dt3390dm*", RUN+="/sbin/dasdconf.sh"
-ACTION=="add", SUBSYSTEM=="ccw", ATTR{modalias}=="ccw:t2107m*dt3380dm*", RUN+="/sbin/dasdconf.sh"
-ACTION=="add", SUBSYSTEM=="ccw", ATTR{modalias}=="ccw:t2107m*dt3390dm*", RUN+="/sbin/dasdconf.sh"
-ACTION=="add", SUBSYSTEM=="ccw", ATTR{modalias}=="ccw:t9343m*dt9345dm*", RUN+="/sbin/dasdconf.sh"
-ACTION=="add", SUBSYSTEM=="ccw", ATTR{modalias}=="ccw:t2105m*dt3380dm*", RUN+="/sbin/dasdconf.sh"
-ACTION=="add", SUBSYSTEM=="ccw", ATTR{modalias}=="ccw:t3990m*dt3380dm*", RUN+="/sbin/dasdconf.sh"
-ACTION=="add", SUBSYSTEM=="ccw", ATTR{modalias}=="ccw:t3880m*dt3390dm*", RUN+="/sbin/dasdconf.sh"
-ACTION=="add", SUBSYSTEM=="ccw", ATTR{modalias}=="ccw:t2105m*dt3390dm*", RUN+="/sbin/dasdconf.sh"
-ACTION=="add", SUBSYSTEM=="ccw", ATTR{modalias}=="ccw:t3990m*dt3390dm*", RUN+="/sbin/dasdconf.sh"
-ACTION=="add", SUBSYSTEM=="ccw", ATTR{modalias}=="ccw:t3880m*dt3370dm*", RUN+="/sbin/dasdconf.sh"
-ACTION=="add", SUBSYSTEM=="ccw", ATTR{modalias}=="ccw:t6310m*dt9336dm*", RUN+="/sbin/dasdconf.sh"
diff --git a/modules.d/95dasd/dasdconf.sh b/modules.d/95dasd/dasdconf.sh
deleted file mode 100755
index fb3ac90e..00000000
--- a/modules.d/95dasd/dasdconf.sh
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/bin/sh
-
-# config file syntax:
-# deviceno sysfs_opts...
-#
-# Examples:
-# 0.0.0203 readonly=1 failfast=1
-# 0.0.0204
-# 0.0.0205 erplog=1
-
-[ -z "$DEVPATH" ] && exit 0
-[ "$ACTION" != "add" ] && exit 0
-
-CHANNEL=${DEVPATH##*/}
-
-CONFIG=/etc/dasd.conf
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-export PATH
-
-warn() {
- [ -e /dev/kmsg ] && echo "<4>dasdconf.sh Warning: $@" > /dev/kmsg
- echo "dasdconf.sh Warning: $@" >&2
-}
-
-if [ -f "$CONFIG" ]; then
- if [ ! -d /sys/bus/ccw/drivers/dasd-eckd ] && [ ! -d /sys/bus/ccw/drivers/dasd-fba ]; then
- #warn "No dasd-eckd or dasd-eckd loaded"
- exit 0
- fi
- tr "A-Z" "a-z" < $CONFIG | while read line; do
- case $line in
- \#*) ;;
- *)
- [ -z "$line" ] && continue
- set $line
-
- # if we are in single add mode, only add the new CHANNEL
- [ "$SUBSYSTEM" = "ccw" ] && [ "$1" != "$CHANNEL" ] && continue
-
- 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
- # if we are in single add mode, this is a failure!
- [ "$SUBSYSTEM" = "ccw" ] && warn "Could not find $DEVICE in sysfs"
- continue
- fi
-
- # skip already onlined devices
- if [ "$(cat $SYSFSPATH/online)" = "1" ]; then
- if [ "$SUBSYSTEM" = "ccw" ]; then
- # if we are in single add mode, we should not touch the device
- warn "$DEVICE is already online, not configuring"
- exit 0
- fi
- continue
- fi
-
- shift
- while [ -n "$1" ]; do
- (
- attribute="$1"
- IFS="="
- set $attribute
-
- if [ "$1" = "use_diag" ]; then
- # this module better only returns after
- # all sysfs entries have the "use_diag" file
- modprobe dasd_diag_mod
- fi
-
- if [ -r "$SYSFSPATH/$1" ]; then
- echo $2 > $SYSFSPATH/$1 || warn "Could not set $1=$2 for $DEVICE"
- else
- warn "$1 does not exist for $DEVICE"
- fi
- )
- shift
- done
-
- # Now, put the device online
- echo 1 > $SYSFSPATH/online || echo "Could not activate $DEVICE"
-
- # if we are in single add mode, we are done
- [ "$SUBSYSTEM" = "ccw" ] && exit 0
- ;;
- esac
- done
-fi
-exit 0
diff --git a/modules.d/95dasd/install b/modules.d/95dasd/install
index cc0ef400..52c81c8e 100755
--- a/modules.d/95dasd/install
+++ b/modules.d/95dasd/install
@@ -1,8 +1,8 @@
#!/bin/bash
inst_hook cmdline 30 "$moddir/parse-dasd.sh"
dracut_install tr
-inst "$moddir/dasdconf.sh" /sbin/dasdconf.sh
-inst_rules "$moddir/56-dasd.rules"
if [[ $hostonly ]]; then
inst /etc/dasd.conf
fi
+inst /sbin/dasdconf.sh
+inst_rules 56-dasd.rules