From c58ad2b41359e1f54d94dd70e6c895f96e725810 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zolt=C3=A1n=20Felleg?= Date: Wed, 26 Apr 2023 20:57:58 +0200 Subject: [PATCH] Updated sns.in (updated to Fedora 38). --- .../firstboot/scripts/01_setupnetworking.sh | 21 ++++++++++++++----- sources/sns.in/envvars | 8 ++++--- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/sources/sns.in/c3d/firstboot/scripts/01_setupnetworking.sh b/sources/sns.in/c3d/firstboot/scripts/01_setupnetworking.sh index e097f80..86b6570 100755 --- a/sources/sns.in/c3d/firstboot/scripts/01_setupnetworking.sh +++ b/sources/sns.in/c3d/firstboot/scripts/01_setupnetworking.sh @@ -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,13 +50,13 @@ 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 ':') @@ -73,3 +81,6 @@ nmcli connection add \ save yes nmcli connection show + +hostnamectl hostname sns.in.useribm.hu +hostnamectl diff --git a/sources/sns.in/envvars b/sources/sns.in/envvars index b4ec612..1f9c13f 100644 --- a/sources/sns.in/envvars +++ b/sources/sns.in/envvars @@ -1,4 +1,6 @@ DISTRIBUTION=Fedora -DISTRIBUTION_VERSION=37 -SPEC_PACKAGES="bind bind-dnssec-utils bind-utils" -SPEC_PACKAGES="$SPEC_PACKAGES python-unversioned-command" +DISTRIBUTION_VERSION=38 +SPEC_PACKAGES="bind \ + bind-dnssec-utils \ + bind-utils \ + python-unversioned-command" -- 2.54.0