From 0d0c8abeaf2068e4d638617dae1acc30adce4266 Mon Sep 17 00:00:00 2001 From: Dan HorĂ¡k Date: Tue, 8 Apr 2025 18:15:41 +0200 Subject: ccw_init: handle portno option from NM configs --- ccw_init | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ccw_init b/ccw_init index 032c273..caa99d2 100644 --- a/ccw_init +++ b/ccw_init @@ -79,6 +79,7 @@ elif [ $MODE = "normal" ]; then NETTYPE=$(sed -nr "/^\[ethernet\]/ { :l /^s390-nettype[ ]*=/ { s/.*=[ ]*//; p; q;}; n; b l;}" $CONFIG_FILE) SUBCHANNELS=$(sed -nr "/^\[ethernet\]/ { :l /^s390-subchannels[ ]*=/ { s/.*=[ ]*//; p; q;}; n; b l;}" $CONFIG_FILE | sed -e "s/;/,/g" -e "s/,$//") LAYER2=$(sed -nr "/^\[ethernet-s390-options\]/ { :l /^layer2[ ]*=/ { s/.*=[ ]*//; p; q;}; n; b l;}" $CONFIG_FILE) + PORTNO=$(sed -nr "/^\[ethernet-s390-options\]/ { :l /^portno[ ]*=/ { s/.*=[ ]*//; p; q;}; n; b l;}" $CONFIG_FILE) else exit 1 fi @@ -116,6 +117,10 @@ if [ "$NETTYPE" = "ctc" -a -n "$CTCPROT" ]; then OPTIONS="$OPTIONS protocol=$CTCPROT" fi +if [ -n "$PORTNO" ]; then + OPTIONS="$OPTIONS portno=$PORTNO" +fi + # SUBCHANNELS is only set on mainframe ccwgroup devices [ -z "$SUBCHANNELS" -o -z "$NETTYPE" ] && exit 0 if [ "$NETTYPE" = "ctc" ]; then -- cgit