2014-06-27 09:31:06 +02:00
|
|
|
From b302dd2a53864bdd4ff271275fa244f654cb92ca Mon Sep 17 00:00:00 2001
|
|
|
|
From: Hannes Reinecke <hare@suse.de>
|
|
|
|
Date: Thu, 26 Jun 2014 10:49:03 +0200
|
|
|
|
Subject: 95dasd_rules: fixup rd.dasd parsing
|
|
|
|
|
|
|
|
There were some errors when rd.dasd parsing, resulting in the
|
|
|
|
device never to be activated. And we should check for
|
|
|
|
cio_ignore even if a udev rules has been found.
|
|
|
|
|
|
|
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
|
|
|
---
|
|
|
|
modules.d/95dasd_rules/parse-dasd.sh | 15 ++++++++-------
|
|
|
|
1 file changed, 8 insertions(+), 7 deletions(-)
|
|
|
|
|
2015-06-30 14:59:59 +02:00
|
|
|
Index: dracut-042/modules.d/95dasd_rules/parse-dasd.sh
|
2015-03-31 16:12:12 +02:00
|
|
|
===================================================================
|
2015-06-30 14:59:59 +02:00
|
|
|
--- dracut-042.orig/modules.d/95dasd_rules/parse-dasd.sh 2015-06-24 18:02:10.257423027 +0200
|
|
|
|
+++ dracut-042/modules.d/95dasd_rules/parse-dasd.sh 2015-06-24 18:02:10.589441929 +0200
|
|
|
|
@@ -29,6 +29,10 @@ create_udev_rule() {
|
2014-06-27 09:31:06 +02:00
|
|
|
esac
|
|
|
|
[ -z "${_drv}" ] && return 0
|
|
|
|
|
|
|
|
+ if [ -x /sbin/cio_ignore ] && cio_ignore -i $ccw > /dev/null ; then
|
|
|
|
+ cio_ignore -r $ccw
|
|
|
|
+ fi
|
|
|
|
+
|
|
|
|
[ -e ${_rule} ] && return 0
|
|
|
|
|
|
|
|
cat > $_rule <<EOF
|
2015-06-30 14:59:59 +02:00
|
|
|
@@ -36,9 +40,6 @@ ACTION=="add", SUBSYSTEM=="ccw", KERNEL=
|
2014-06-27 09:31:06 +02:00
|
|
|
ACTION=="add", SUBSYSTEM=="drivers", KERNEL=="$_drv", IMPORT{program}="collect $ccw %k ${ccw} $_drv"
|
|
|
|
ACTION=="add", ENV{COLLECT_$ccw}=="0", ATTR{[ccw/$ccw]online}="1"
|
|
|
|
EOF
|
|
|
|
- if [ -x /sbin/cio_ignore ] && ! cio_ignore -i $ccw > /dev/null ; then
|
|
|
|
- cio_ignore -r $ccw
|
|
|
|
- fi
|
|
|
|
}
|
|
|
|
|
|
|
|
for dasd_arg in $(getargs root=) $(getargs resume=); do
|
2015-06-30 14:59:59 +02:00
|
|
|
@@ -46,7 +47,7 @@ for dasd_arg in $(getargs root=) $(getar
|
2014-06-27 09:31:06 +02:00
|
|
|
case $dasd_arg in
|
|
|
|
/dev/disk/by-path/ccw-*)
|
|
|
|
ccw_arg=${dasd_arg##*/}
|
|
|
|
- break;
|
|
|
|
+ ;;
|
|
|
|
esac
|
|
|
|
if [ -n "$ccw_arg" ] ; then
|
2015-03-31 16:12:12 +02:00
|
|
|
IFS="-"
|
2015-06-30 14:59:59 +02:00
|
|
|
@@ -75,8 +76,8 @@ for dasd_arg in $(getargs rd.dasd=); do
|
2014-06-27 09:31:06 +02:00
|
|
|
end=${1#0.0.}
|
|
|
|
shift
|
2015-03-31 16:12:12 +02:00
|
|
|
unset IFS
|
2014-06-27 09:31:06 +02:00
|
|
|
- for dev in $(seq $(( 10#$start )) $(( 10#$end )) ) ; do
|
|
|
|
- create_udev_rule $(printf "0.0.%04d" "$dev")
|
|
|
|
+ for dev in $(seq $(( 16#$start )) $(( 16#$end )) ) ; do
|
|
|
|
+ create_udev_rule $(printf "0.0.%04x" "$dev")
|
|
|
|
done
|
|
|
|
;;
|
|
|
|
*)
|
2015-06-30 14:59:59 +02:00
|
|
|
@@ -85,7 +86,7 @@ for dasd_arg in $(getargs rd.dasd=); do
|
2014-06-27 09:31:06 +02:00
|
|
|
ro=1
|
|
|
|
fi
|
|
|
|
dev=${dev#0.0.}
|
|
|
|
- create_udev_rule $(printf "0.0.%04d" $(( 10#$dev )) )
|
|
|
|
+ create_udev_rule $(printf "0.0.%04x" $(( 16#$dev )) )
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
esac
|