rpms/s390utils/F-12 cpi.initd, 1.1, 1.2 s390utils.spec, 1.14, 1.15 zfcpconf.sh, 1.2, 1.3

Dan Horák sharkcz at fedoraproject.org
Tue Dec 1 09:59:31 UTC 2009


Author: sharkcz

Update of /cvs/pkgs/rpms/s390utils/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11448

Modified Files:
	cpi.initd s390utils.spec zfcpconf.sh 
Log Message:
* Tue Dec  1 2009 Dan Horák <dan[at]danny.cz> 2:1.8.2-6
- fixed return value in cpi initscript (#541389)
- updated zfcpconf.sh script from dracut



Index: cpi.initd
===================================================================
RCS file: /cvs/pkgs/rpms/s390utils/F-12/cpi.initd,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- cpi.initd	9 Nov 2009 19:28:41 -0000	1.1
+++ cpi.initd	1 Dec 2009 09:59:31 -0000	1.2
@@ -33,6 +33,8 @@ prog="cpi"
 cpipath=/sys/firmware/cpi
 
 start() {
+    [ `id -u` -eq 0 ] || return 4
+    
     echo -n $"Starting $prog: "
 
     if [ -d $cpipath ]; then


Index: s390utils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/s390utils/F-12/s390utils.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -r1.14 -r1.15
--- s390utils.spec	13 Nov 2009 10:21:17 -0000	1.14
+++ s390utils.spec	1 Dec 2009 09:59:31 -0000	1.15
@@ -8,7 +8,7 @@ Name:           s390utils
 Summary:        Utilities and daemons for IBM System/z
 Group:          System Environment/Base
 Version:        1.8.2
-Release:        5%{?dist}
+Release:        6%{?dist}
 Epoch:          2
 License:        GPLv2 and GPLv2+ and CPL
 Buildroot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -798,6 +798,10 @@ User-space development files for the s39
 
 
 %changelog
+* Tue Dec  1 2009 Dan Horák <dan[at]danny.cz> 2:1.8.2-6
+- fixed return value in cpi initscript (#541389)
+- updated zfcpconf.sh script from dracut
+
 * Fri Nov 13 2009 Dan Horák <dan[at]danny.cz> 2:1.8.2-5
 - added multiple fixes from IBM (#533955, #537142, #537144)
 


Index: zfcpconf.sh
===================================================================
RCS file: /cvs/pkgs/rpms/s390utils/F-12/zfcpconf.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- zfcpconf.sh	30 Sep 2009 20:10:50 -0000	1.2
+++ zfcpconf.sh	1 Dec 2009 09:59:31 -0000	1.3
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # config file syntax:
 # deviceno   WWPN   FCPLUN
@@ -22,22 +22,34 @@ CONFIG=/etc/zfcp.conf
 PATH=/bin:/usr/bin:/sbin:/usr/sbin
 
 if [ -f "$CONFIG" ]; then
-
    if [ ! -d /sys/bus/ccw/drivers/zfcp ]; then
       modprobe zfcp
    fi
    if [ ! -d /sys/bus/ccw/drivers/zfcp ]; then
       return
    fi
-   cat $CONFIG | grep -v "^#" | tr "A-Z" "a-z" | while read line; do
-      numparams=$(echo $line | wc -w)
-      if [ $numparams == 5 ]; then
-         read DEVICE SCSIID WWPN SCSILUN FCPLUN < <(echo $line)
-         echo "Warning: Deprecated values in /etc/zfcp.conf, ignoring SCSI ID $SCSIID and SCSI LUN $SCSILUN"
-      elif [ $numparams == 3 ]; then
-         read DEVICE WWPN FCPLUN < <(echo $line)
-      fi
-      echo 1 > /sys/bus/ccw/drivers/zfcp/${DEVICE/0x/}/online
-      [ ! -d /sys/bus/ccw/drivers/zfcp/${DEVICE/0x/}/$WWPN/$FCPLUN ] && echo $FCPLUN > /sys/bus/ccw/drivers/zfcp/${DEVICE/0x/}/$WWPN/unit_add
+   tr "A-Z" "a-z" < $CONFIG| while read line; do
+       case $line in
+	   \#*) ;;
+	   *)
+	       [ -z "$line" ] && continue
+	       set $line
+	       if [ $# -eq 5 ]; then
+		   DEVICE=$1
+		   SCSIID=$2
+		   WWPN=$3
+		   SCSILUN=$4
+		   FCPLUN=$5
+		   echo "Warning: Deprecated values in /etc/zfcp.conf, ignoring SCSI ID $SCSIID and SCSI LUN $SCSILUN"
+	       elif [ $# -eq 3 ]; then
+		   DEVICE=${1##*0x}
+		   WWPN=$2
+		   FCPLUN=$3
+	       fi
+	       echo 1 > /sys/bus/ccw/drivers/zfcp/${DEVICE}/online
+	       [ ! -d /sys/bus/ccw/drivers/zfcp/${DEVICE}/${WWPN}/${FCPLUN} ] \
+		   && echo $FCPLUN > /sys/bus/ccw/drivers/zfcp/${DEVICE}/${WWPN}/unit_add
+	       ;;
+       esac
    done
 fi




More information about the fedora-extras-commits mailing list