From: Michael Tremer <michael.tremer@ipfire.org>
To: Adolf Belka <adolf.belka@ipfire.org>
Cc: development@lists.ipfire.org
Subject: Re: [PATCH] setup: Fixes bug10245 - restarts non-local interfaces if no driver change
Date: Thu, 19 Jun 2025 11:14:43 +0100 [thread overview]
Message-ID: <8AF3C889-B4E1-41DE-BB30-689F9559F583@ipfire.org> (raw)
In-Reply-To: <20250618135649.3314591-1-adolf.belka@ipfire.org>
Hello Adolf,
I am not sure that I follow the problem.
Why do we need to stop and start the network again later?
Would “non-local” not mean RED only?
-Michael
> On 18 Jun 2025, at 14:56, Adolf Belka <adolf.belka@ipfire.org> wrote:
>
> - 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 <adolf.belka@ipfire.org>
> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
> ---
> 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
>
>
next prev parent reply other threads:[~2025-06-19 10:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 13:56 Adolf Belka
2025-06-19 10:14 ` Michael Tremer [this message]
2025-06-19 11:50 ` Adolf Belka
2025-06-19 13:36 ` Adolf Belka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8AF3C889-B4E1-41DE-BB30-689F9559F583@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=adolf.belka@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox