Skip to content

Commit

Permalink
Merge pull request #380 from aafeijoo-suse/SLE-15-SP5_Update-bsc1230330
Browse files Browse the repository at this point in the history
fix(zfcp_rules): check for presence of legacy rules (bsc#1230330) (SLE15-SP5:Update)
  • Loading branch information
aafeijoo-suse authored Sep 18, 2024
2 parents 7930ab2 + ed097b8 commit a838b0c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules.d/95zfcp_rules/parse-zfcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ create_udev_rule() {
fi

[ -z "$wwpn" ] || [ -z "$lun" ] && return
m=$(sed -n "/.*${wwpn}.*${lun}.*/p" "$_rule")
if [ -z "$m" ]; then
cat >> "$_rule" << EOF
if [ -f "$_rule" ]; then
m=$(sed -n "/.*${wwpn}.*${lun}.*/p" "$_rule")
if [ -z "$m" ]; then
cat >> "$_rule" << EOF
ACTION=="add", KERNEL=="rport-*", ATTR{port_name}=="$wwpn", SUBSYSTEMS=="ccw", KERNELS=="$ccw", ATTR{[ccw/$ccw]$wwpn/unit_add}="$lun"
EOF
fi
fi
}

Expand Down

0 comments on commit a838b0c

Please sign in to comment.