cms/cmssetup.sh: correct port for zfcp.conf
authorHarald Hoyer <harald@redhat.com>
Wed, 31 Jul 2013 15:28:04 +0000 (17:28 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 31 Jul 2013 15:29:12 +0000 (17:29 +0200)
modules.d/80cms/cmssetup.sh

index 16704c34892d0642ee01ce0c374cbf60a531b957..36955bc3b431d4726770a86093f510df84947185 100755 (executable)
@@ -182,7 +182,19 @@ function dasd_settle_all() {
 
         unset _do_zfcp
         for i in ${!FCP_*}; do
-           echo "${!i}" >> /etc/zfcp.conf
+           echo "${!i}" | while read port rest; do
+                case $port in
+                *.*.*)
+                    ;;
+                *.*)
+                    port="0.$port"
+                    ;;
+                *)
+                    port="0.0.$port"
+                    ;;
+                esac
+                echo $port $rest >> /etc/zfcp.conf
+            done
            _do_zfcp=1
         done
         [[ $_do_zfcp ]] && zfcp_cio_free