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 <hare@suse.de>
master
Hannes Reinecke 2014-07-10 14:56:54 +02:00 committed by Daniel Molkentin
parent e0c3b0793f
commit 3a8ba44026
1 changed files with 4 additions and 3 deletions

View File

@ -14,11 +14,11 @@ cmdline() {
_wwpn=$(cat ${_sdev}/wwpn) _wwpn=$(cat ${_sdev}/wwpn)
_ccw=$(cat ${_sdev}/hba_id) _ccw=$(cat ${_sdev}/hba_id)
echo "rd.zfcp=${_ccw},${_wwpn},${_lun}" echo "rd.zfcp=${_ccw},${_wwpn},${_lun}"
return 1 return 0
} }
[[ $hostonly ]] || [[ $mount_needs ]] && { [[ $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 # called by dracut
@ -29,6 +29,7 @@ check() {
require_binaries /usr/lib/udev/collect || return 1 require_binaries /usr/lib/udev/collect || return 1


[[ $hostonly ]] || [[ $mount_needs ]] && { [[ $hostonly ]] || [[ $mount_needs ]] && {
found=0
for _ccw in /sys/bus/ccw/devices/*/host* ; do for _ccw in /sys/bus/ccw/devices/*/host* ; do
[ -d "$_ccw" ] || continue [ -d "$_ccw" ] || continue
found=$(($found+1)); found=$(($found+1));