summaryrefslogtreecommitdiffstats
path: root/ccw_init
diff options
context:
space:
mode:
authorDan Horák <dan@danny.cz>2025-04-08 18:15:41 +0200
committerDan Horák <dan@danny.cz>2025-04-08 18:15:41 +0200
commit0d0c8abeaf2068e4d638617dae1acc30adce4266 (patch)
treeac9ee498238c469d916786d139f3381709f4e6ba /ccw_init
parent02124d9b50c1a3e9884c0f87f7d679d2f68a7c63 (diff)
downloadutils-master.tar.gz
utils-master.tar.xz
utils-master.zip
ccw_init: handle portno option from NM configsHEADmaster
Diffstat (limited to 'ccw_init')
-rw-r--r--ccw_init5
1 files changed, 5 insertions, 0 deletions
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