From: Hannes Reinecke Date: Thu, 10 Jul 2014 12:56:54 +0000 (+0200) Subject: 95zfcp_rules: Store all devices in commandline X-Git-Tag: 046~51^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a8ba440265696ce1279dc12eb5a7acda14c1712;p=thirdparty%2Fdracut.git 95zfcp_rules: Store all devices in commandline 'for_each_host_dev_and_slaves' would stop at the first found device, so the cmdline() call would never list all required devices. Use 'for_each_host_dev_and_slaves_all' instead and filter out duplicates. Signed-off-by: Hannes Reinecke --- diff --git a/modules.d/95zfcp_rules/module-setup.sh b/modules.d/95zfcp_rules/module-setup.sh index d6a33b13d..f7400f8ee 100755 --- a/modules.d/95zfcp_rules/module-setup.sh +++ b/modules.d/95zfcp_rules/module-setup.sh @@ -14,11 +14,11 @@ cmdline() { _wwpn=$(cat ${_sdev}/wwpn) _ccw=$(cat ${_sdev}/hba_id) echo "rd.zfcp=${_ccw},${_wwpn},${_lun}" - return 1 + return 0 } [[ $hostonly ]] || [[ $mount_needs ]] && { - for_each_host_dev_and_slaves is_zfcp - } + for_each_host_dev_and_slaves_all is_zfcp + } | sort | uniq } # called by dracut @@ -29,6 +29,7 @@ check() { require_binaries /usr/lib/udev/collect || return 1 [[ $hostonly ]] || [[ $mount_needs ]] && { + found=0 for _ccw in /sys/bus/ccw/devices/*/host* ; do [ -d "$_ccw" ] || continue found=$(($found+1));