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 4bNGgW3Bg7z30Hh for ; Thu, 19 Jun 2025 10:14:47 +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 4bNGgR6qD7z2xLm for ; Thu, 19 Jun 2025 10:14:43 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4bNGgR3PWZzkc; Thu, 19 Jun 2025 10:14:43 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1750328083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yzq9Xf516u4pZJORYT9/fgUr2fWBCJBy4HS0k0Xqp4A=; b=ak5/cSXAz0Qd0OwJBH4K+w4ZoCib10tHBU4YDrCon+miON+h1omxPBwOcoYbVEvqNrZdgG EzdUMGcxu4lrFuAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1750328083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yzq9Xf516u4pZJORYT9/fgUr2fWBCJBy4HS0k0Xqp4A=; b=ijODn4qV7OtWc5i/VAEgszF17qGQKeKASoz6B9uHWh5EceRAglzVTWZ1bCXPb4hjyIYXPi di1fLZjJ3nzbCrA/eywxeFj0yoySNXewJqOylapUcj+OLAthc4riBw8SlKRsGOTioDl8it 8qHVsHN79dyBQsUZEzuzD/N+wH2N0cduV3wQRw9TEMEwSPMsoQ/BTQOBtbwP19DJAn7WsZ Q9Ugf7DXAg3EzNolUQc23zTmZznD2Xxt456EEcAk5OrMMbE6BMTm+UnZyh2xvBFIfrtB8c 89ApMR5AOeIshjfnBIVGwBJuh0VOwGzChR+Irfn5Od8hTUkSiBO/1S1p0rQlqA== Content-Type: text/plain; charset=utf-8 Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: Mime-Version: 1.0 Subject: Re: [PATCH] setup: Fixes bug10245 - restarts non-local interfaces if no driver change From: Michael Tremer In-Reply-To: <20250618135649.3314591-1-adolf.belka@ipfire.org> Date: Thu, 19 Jun 2025 11:14:43 +0100 Cc: development@lists.ipfire.org Content-Transfer-Encoding: quoted-printable Message-Id: <8AF3C889-B4E1-41DE-BB30-689F9559F583@ipfire.org> References: <20250618135649.3314591-1-adolf.belka@ipfire.org> To: Adolf Belka Hello Adolf, I am not sure that I follow the problem. Why do we need to stop and start the network again later? Would =E2=80=9Cnon-local=E2=80=9D not mean RED only? -Michael > On 18 Jun 2025, at 14:56, Adolf Belka wrote: >=20 > - 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. >=20 > Fixes: bug10245 > Tested-by: Adolf Belka > Signed-off-by: Adolf Belka > --- > src/setup/networking.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) >=20 > 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 =3D=3D 0) > runcommandwithstatus("/etc/rc.d/init.d/network stop red blue orange", > - _("Networking"), _("Restarting non-local network..."), NULL); > + _("Networking"), _("Stopping non-local network..."), NULL); >=20 > findkey(kv, "CONFIG_TYPE", temp); configtype =3D atol(temp); > if (configtype =3D=3D 1) > @@ -513,6 +513,10 @@ int changedrivers(void) > } > while ( rc <=3D 2); >=20 > + if ((automode =3D=3D 0) && (netaddresschange =3D=3D 0)) > + runcommandwithstatus("/etc/rc.d/init.d/network start red blue = orange", > + _("Networking"), _("Restarting non-local network..."), NULL); > + > freekeyvalues(kv); > return 1; > } > --=20 > 2.49.0 >=20 >=20