From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4bMlfR5Mclz307y for ; Wed, 18 Jun 2025 13:57:03 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4bMlfN1tJLz2yph for ; Wed, 18 Jun 2025 13:57:00 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4bMlfM2n70z1qC; Wed, 18 Jun 2025 13:56:59 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1750255019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=LGBHcHBc/wpbv/spKRFYwCWftg9ITgVqSrs5YFZsjeQ=; b=Z0qCr/uIuus7tQ1yA1eDIUFcMfQnjMVWoy4CIBwV0cDd+U4P4Q/l2QGMHXg9vi63Yt3oe6 jpZT6wVPev7i+1DA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1750255019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=LGBHcHBc/wpbv/spKRFYwCWftg9ITgVqSrs5YFZsjeQ=; b=HjTHQvhrCj05jC39ZMH9QodpEb5exdBGmolzUET6L4bAqd+oszUbzIiFmRL3fbDD2ZFFMP ARjoEVWHehR62GTjo3NeoQKuy6LhcfY8+ik0exN/m7vdXPzQJ5j6t9FgqNXAkNxv4FIZLe 4+C5C604koVSnMg/XNd3m1WQz9uN5KjiVcWFPLLB6dR/VVPKPnQU82S1Kgj8/IwnbZMY4S YorJMTrQYmWuSaSDc+l9/gGJC/QH49hseBtOqTQCukp/BCZC0XKqFhATig8+S1BjXiMEi7 ZbiZfI0QARIPVGnC+ZrO2ahCv3kAoNXS7h+bIKmL5YqFjQ92ebyz76aa0Qn2gw== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH] setup: Fixes bug10245 - restarts non-local interfaces if no driver change Date: Wed, 18 Jun 2025 15:56:49 +0200 Message-ID: <20250618135649.3314591-1-adolf.belka@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit - In the setup menu if the OK button is pressed when it asks if you want to change any of the interfaces then the red, blue and orange interfaces are stopped. However if none of the interfaces are changed then the network restart code does not get used. - This results in the system ending up with only the green interfrace being UP and connected. - This is the first time I have done anything with c code so if my change is not appropriate or there is a better way of doing it then I am fully open to suggestions. - I did test the code out on my vm testbed and it worked the way I expected it to but that does not mean it is the right thing to do. - I also changed the text for the Network stop command from Restarting to Stopping as it does not start the network again in all cases. The patch ends up now with the stop message after the OK button has been pressed on the window showing the interfaces that are available is shown. Then if no interface is changed and the Done button is pressed the message about restarting the non-local network is shown. - If an interface is selected then the starting non-local network interfaces is not shown as the full network start and unbound start will be carried out. Fixes: bug10245 Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- src/setup/networking.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/setup/networking.c b/src/setup/networking.c index 8d398f365..c380b1d34 100644 --- a/src/setup/networking.c +++ b/src/setup/networking.c @@ -422,7 +422,7 @@ int changedrivers(void) } if (automode == 0) runcommandwithstatus("/etc/rc.d/init.d/network stop red blue orange", - _("Networking"), _("Restarting non-local network..."), NULL); + _("Networking"), _("Stopping non-local network..."), NULL); findkey(kv, "CONFIG_TYPE", temp); configtype = atol(temp); if (configtype == 1) @@ -513,6 +513,10 @@ int changedrivers(void) } while ( rc <= 2); + if ((automode == 0) && (netaddresschange == 0)) + runcommandwithstatus("/etc/rc.d/init.d/network start red blue orange", + _("Networking"), _("Restarting non-local network..."), NULL); + freekeyvalues(kv); return 1; } -- 2.49.0