dracut/0005-cms-cmssetup.sh-correct-port-for-zfcp.conf.patch
Harald Hoyer 181ae552a5 dracut-031-6.git20130731
- cmssetup: fixed port for zfcp.conf
- lvm: call lvchange with --yes to boot from snapshots
2013-07-31 17:41:17 +02:00

35 lines
1.1 KiB
Diff

From 64a7eace88b30f3ea03df86ddceb23d4949b692d Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 31 Jul 2013 17:28:04 +0200
Subject: [PATCH] cms/cmssetup.sh: correct port for zfcp.conf
---
modules.d/80cms/cmssetup.sh | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/modules.d/80cms/cmssetup.sh b/modules.d/80cms/cmssetup.sh
index 16704c3..36955bc 100755
--- a/modules.d/80cms/cmssetup.sh
+++ b/modules.d/80cms/cmssetup.sh
@@ -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