From fdf7a3a74462b03edee4173966ad96a795eca833 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zolt=C3=A1n=20Felleg?= Date: Wed, 27 Feb 2019 10:36:09 +0100 Subject: [PATCH] Updated ens.pm.f29 (setupnetworking script), pns.usr.f29 (added acubuntu1804). --- .../firstboot/01_setupnetworking.sh | 55 ++++++++++--------- .../var/named/228.10.in-addr.arpa.zone | 3 +- .../install/var/named/usr.user.hu.zone | 3 +- 3 files changed, 32 insertions(+), 29 deletions(-) diff --git a/sources/ens.pm.f29/firstboot/01_setupnetworking.sh b/sources/ens.pm.f29/firstboot/01_setupnetworking.sh index d0ee46d..1556f1d 100755 --- a/sources/ens.pm.f29/firstboot/01_setupnetworking.sh +++ b/sources/ens.pm.f29/firstboot/01_setupnetworking.sh @@ -13,43 +13,44 @@ do systemctl --quiet is-active NetworkManager.service NM_RC=$? done -[ $WAITED -ne 0 ] && echo +[ $WAITED -eq 1 ] && echo -CONNECTIONS=$(nmcli connection show | grep -v '^NAME' | wc -l) -if [ $CONNECTIONS -ne 1 ] -then +CONNECTIONS=$(nmcli --terse connection show | wc -l) +while [ $CONNECTIONS -ne 1 ] +do echo "Number of connections: $CONNECTIONS" >&2 - exit 1 -fi - -CONNECTION_LINE=$(nmcli connection show | grep -v '^NAME') -CONNECTION_TOKENS=$(echo $CONNECTION_LINE | wc -w) -#CONNECTION_NAME_POS=$(( $CONNECTION_TOKENS - 3 )) -CONNECTION_UUID_POS=$(( $CONNECTION_TOKENS - 2 )) -#CONNECTION_TYPE_POS=$(( $CONNECTION_TOKENS - 1 )) -CONNECTION_DEVICE_POS=$CONNECTION_TOKENS -#CONNECTION_NAME=$(echo $CONNECTION_LINE \ -# | cut -f -$CONNECTION_NAME_POS -d ' ') -CONNECTION_UUID=$(echo $CONNECTION_LINE \ - | cut -f $CONNECTION_UUID_POS -d ' ') -#CONNECTION_TYPE=$(echo $CONNECTION_LINE \ -# | cut -f $CONNECTION_TYPE_POS -d ' ') -CONNECTION_DEVICE=$(echo $CONNECTION_LINE \ - | cut -f $CONNECTION_DEVICE_POS -d ' ') + sleep 1 + CONNECTIONS=$(nmcli --terse connection show | wc -l) +done + +nmcli --terse connection show | grep ':$' >/dev/null +ALL_CONNECTION_DEVICES_KNOWN=$? +while [ $ALL_CONNECTION_DEVICES_KNOWN -eq 0 ] +do + echo "Not all connection devices are known yet" >&2 + sleep 1 + nmcli --terse connection show | grep ':$' >/dev/null + ALL_CONNECTION_DEVICES_KNOWN=$? +done + +CONNECTION_LINE=$(nmcli --terse connection show) +CONNECTION_UUID=$(echo $CONNECTION_LINE | cut -f 2 -d ':') +CONNECTION_DEVICE=$(echo $CONNECTION_LINE | cut -f 4 -d ':') nmcli connection delete uuid "$CONNECTION_UUID" nmcli connection add \ - type 802-3-ethernet \ - ifname $CONNECTION_DEVICE \ - con-name perimeter \ - autoconnect yes \ - save yes \ + connection.autoconnect yes \ + connection.id perimeter \ + connection.interface-name $CONNECTION_DEVICE \ + connection.type 802-3-ethernet \ ipv4.addresses "192.168.173.64/24" \ ipv4.dns "192.168.173.174" \ ipv4.dns-search "pm.user.hu" \ ipv4.gateway "192.168.173.254" \ ipv4.method "manual" \ ipv4.routes "10.228.0.0/16 192.168.173.1" \ - ipv6.method "ignore" + ipv6.method "ignore" \ + save yes + nmcli connection show diff --git a/sources/pns.usr.f29/postinstall/install/var/named/228.10.in-addr.arpa.zone b/sources/pns.usr.f29/postinstall/install/var/named/228.10.in-addr.arpa.zone index 6268b23..5e81229 100644 --- a/sources/pns.usr.f29/postinstall/install/var/named/228.10.in-addr.arpa.zone +++ b/sources/pns.usr.f29/postinstall/install/var/named/228.10.in-addr.arpa.zone @@ -1,6 +1,6 @@ $TTL 86400 @ IN SOA ns.usr.user.hu. hostmaster.mx.usr.user.hu. ( - 2019021101 ; Serial + 2019022701 ; Serial 86400 ; Refresh (1 day) 7200 ; Retry (2 hours) 2419200 ; Expire (4 weeks) @@ -356,6 +356,7 @@ $GENERATE 100-254 $.43 IN PTR dhcp$.usr.user.hu. ; ================================================================ ; acsiba (ac = 1 * 10 + 3 = 13) ; ================================================================ +18.13 IN PTR acubuntu1804.usr.user.hu. 14.13 IN PTR acubuntu14.usr.user.hu. 11.13 IN PTR acopensuse11.usr.user.hu. 10.13 IN PTR acwin10.usr.user.hu. diff --git a/sources/pns.usr.f29/postinstall/install/var/named/usr.user.hu.zone b/sources/pns.usr.f29/postinstall/install/var/named/usr.user.hu.zone index 468b637..c110b02 100644 --- a/sources/pns.usr.f29/postinstall/install/var/named/usr.user.hu.zone +++ b/sources/pns.usr.f29/postinstall/install/var/named/usr.user.hu.zone @@ -1,6 +1,6 @@ $TTL 86400 @ IN SOA ns.usr.user.hu. hostmaster.mx.usr.user.hu. ( - 2019021101 ; Serial + 2019022701 ; Serial 86400 ; Refresh (1 day) 7200 ; Retry (2 hours) 2419200 ; Expire (4 weeks) @@ -374,6 +374,7 @@ aiac922bmc IN A 10.228.19.12 ; ab ; ================================================================ ; acsiba (ac = 1 * 10 + 3 = 13) ; ================================================================ +acubuntu1804 IN A 10.228.13.18 ; tsmterminal acubuntu14 IN A 10.228.13.14 ; tsmterminal acopensuse11 IN A 10.228.13.11 ; tsmterminal acwin10 IN A 10.228.13.10 -- 2.54.0