Updated ws.pm (updated to Fedora 38).
authorZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Thu, 27 Apr 2023 15:07:18 +0000 (17:07 +0200)
committerZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Thu, 27 Apr 2023 15:07:18 +0000 (17:07 +0200)
sources/ws.pm/c3d/firstboot/scripts/01_setupnetworking.sh
sources/ws.pm/envvars

index 000a8dba4b27b1c0d9a67fb06d42944c0c2613d8..532cfdbe8e6c073dbf9c95a24a7d8b44227d8960 100755 (executable)
@@ -14,6 +14,10 @@ do
     then
         exit 1
     fi
+    if [ $CYCLES_WAITED -eq 0 ]
+    then
+        echo -n "Waiting for NetworkManager"
+    fi
     echo -n .
     sleep 1
     CYCLES_WAITED=$(( $CYCLES_WAITED + 1 ))
@@ -22,17 +26,21 @@ do
 done
 [ $CYCLES_WAITED -gt 0 ] && echo
 
-# wait for one/the network connection to come up
+# wait for the two network connections to come up
 CONNECTION_DEVICES_UP=$(nmcli --terse connection show \
                             | grep --invert-match ':$' | wc -l)
 CYCLES_WAITED=0
-while [ $CONNECTION_DEVICES_UP -lt 1 ]
+while [ $CONNECTION_DEVICES_UP -lt 2 ]
 do
     if [ $CYCLES_WAITED -ge 10 ]
     then
         nmcli connection show
         exit 1
     fi
+    if [ $CYCLES_WAITED -eq 0 ]
+    then
+        echo -n "Waiting for the network connection"
+    fi
     echo -n .
     sleep 1
     CYCLES_WAITED=$(( $CYCLES_WAITED + 1 ))
@@ -42,18 +50,23 @@ done
 [ $CYCLES_WAITED -gt 0 ] && echo
 
 CONNECTIONS=$(nmcli --terse connection show | wc -l)
-if [ $CONNECTIONS -ne 1 ]
+if [ $CONNECTIONS -ne 2 ]
 then
-    echo "Number of connections: $CONNECTIONS" >&2
+    echo "Number of connections: $CONNECTIONS instead of 2" >&2
     exit 1
 fi
 
-CONNECTION_LINE=$(nmcli --terse connection show)
+CONNECTION_LINE=$(nmcli --terse connection show | grep ':eth0$')
 CONNECTION_UUID=$(echo $CONNECTION_LINE | cut -f 2 -d ':')
 CONNECTION_DEVICE=$(echo $CONNECTION_LINE | cut -f 4 -d ':')
 
 nmcli connection delete uuid "$CONNECTION_UUID"
 
+#    ipv6.addresses "2a02:d400:0000:f2ad:000c:18ff:fe03:adf9/64" \
+#    ipv6.dns "2a02:d400:0000:f2ad:000c:18ff:fe03:adae" \
+#    ipv6.dns-search "pm.useribm.hu" \
+#    ipv6.method "manual" \
+#    ipv6.routes "2a02:d400:0000:f268::/64 2a02:d400:0000:f2ad:000c:18ff:fe03:ad01" \
 nmcli connection add \
     connection.autoconnect yes \
     connection.id perimeter \
@@ -65,11 +78,10 @@ nmcli connection add \
     ipv4.gateway "192.168.173.254" \
     ipv4.method "manual" \
     ipv4.routes "10.228.0.0/16 192.168.173.1, 192.168.42.0/24 192.168.173.1" \
-    ipv6.addresses "2a02:d400:0000:f2ad:000c:18ff:fe03:adf9/64" \
-    ipv6.dns "2a02:d400:0000:f2ad:000c:18ff:fe03:adae" \
-    ipv6.dns-search "pm.useribm.hu" \
-    ipv6.method "manual" \
-    ipv6.routes "2a02:d400:0000:f268::/64 2a02:d400:0000:f2ad:000c:18ff:fe03:ad01" \
+    ipv6.method "disabled" \
     save yes
 
 nmcli connection show
+
+hostnamectl hostname ws.pm.useribm.hu
+hostnamectl
index 4d0f52de19e99b7968d8fbffbca65b14bebe1cac..3871777961f11b3c797f2ebac42e443da805f3b5 100644 (file)
@@ -1,3 +1,7 @@
 DISTRIBUTION=Fedora
-DISTRIBUTION_VERSION=37
-SPEC_PACKAGES="cronie httpd mod_ssl python3-certbot-apache rsync"
+DISTRIBUTION_VERSION=38
+SPEC_PACKAGES="cronie \
+               httpd \
+               mod_ssl \
+               python3-certbot-apache \
+               rsync"