From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH] optionsfw.cgi: Centered 'Save...' buttons - added missing lang strings Date: Tue, 29 Dec 2020 12:28:44 +0100 Message-ID: <23B2FC31-A636-4BAA-9C46-02687640FAB4@ipfire.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5514063357708204799==" List-Id: --===============5514063357708204799== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, > On 29 Dec 2020, at 12:19, Matthias Fischer = wrote: >=20 > On 29.12.2020 11:22, Michael Tremer wrote: >> Hi, >=20 > Hi, >=20 >>> On 28 Dec 2020, at 14:48, Matthias Fischer wrote: >>>=20 >>> I had these already used in my previous DNS/NTP-patch, that's why I missed >>> them. >>=20 >> That=E2=80=99s what I thought. >=20 > ;-) >=20 >> But I do not understand how we can change the label on the button, because= it does not restart the firewall and we unfortunately cannot do that here. >=20 > I wanted to keep the 'Save' button in case the user wants to make > additional changes. After choosing 'Save' the usual errormessage/notice > appears. But it should be clear that clicking 'Save' is NOT enough for > the DNS/NTP changes to take effect. This could be adapted to read 'For > changes to take effect you have to choose Save and Restart', e.g. >=20 > The problem with the DNS/NTP rules was that the usual error message > leads to the firewall GUI, where clicking 'Apply changes' (only) > triggers '/usr/local/bin/firewallctrl' which is not enough in this case. > The DNS/NTP rules are not applied. Since they reside in > '/etc/rc.d/init.d/firewall', the execution of '/etc/rc.d/init.d/firewall > restart' is needed here. >=20 > So I added a *second* button ('Save and Restart') which triggers a > *complete* re*start* of the firewall rules. And because of that I needed > the new binary 'optionsfwctrl' which does the job. >=20 > As far as I can see, adding this 'Restart'-functionality avoids a > (former needed) complete reboot if you changed some options on > 'optionsfw.cgi'. Thats how I interpret the message 'Some options need a > reboot to take effect'. Which options are these, anyway? >=20 > I hope I could make myself clear...? Yes you did, but this still doesn=E2=80=99t work. There are plenty of temporary rules that are being created and which simply w= ill get lost after restarting the firewall. Mainly this affects IPsec, but al= so QoS. So you will kill all IPsec tunnels unless those are being shut down and broug= ht up again. Also the command was not part of this patch, so the button does not do what i= t says it would be doing. -Michael >> This would probably be more confusing. Is your intention to have the firew= all restart entirely at this point when the user clicks the button? >=20 > Yes - that is what must be done now by adding or deleting the DNS/NTP-rules. >=20 > Best, > Matthias >=20 >> -Michael >>=20 >>> Now added for 'next' and the 'centered buttons' patch. >>>=20 >>> Signed-off-by: Matthias Fischer >>> --- >>> langs/de/cgi-bin/de.pl | 1 + >>> langs/en/cgi-bin/en.pl | 1 + >>> 2 files changed, 2 insertions(+) >>>=20 >>> diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl >>> index 87181c184..9d403b883 100644 >>> --- a/langs/de/cgi-bin/de.pl >>> +++ b/langs/de/cgi-bin/de.pl >>> @@ -1110,6 +1110,7 @@ >>> 'fw settings dropdown' =3D> 'Alle Netzwerke auf Regelerstellungsseite anz= eigen', >>> 'fw settings remark' =3D> 'Anmerkungen in Regeltabelle anzeigen', >>> 'fw settings ruletable' =3D> 'Leere Regeltabellen anzeigen', >>> +'fw settings save and restart' =3D> 'Speichern und Neustart', >>> 'fwdfw ACCEPT' =3D> 'Akzeptieren (ACCEPT)', >>> 'fwdfw DROP' =3D> 'Verwerfen (DROP)', >>> 'fwdfw MODE1' =3D> 'Alle Pakete verwerfen', >>> diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl >>> index 625c6899f..476d3304c 100644 >>> --- a/langs/en/cgi-bin/en.pl >>> +++ b/langs/en/cgi-bin/en.pl >>> @@ -1136,6 +1136,7 @@ >>> 'fw settings dropdown' =3D> 'Show all networks on rulecreation site', >>> 'fw settings remark' =3D> 'Show remarks in ruletable', >>> 'fw settings ruletable' =3D> 'Show empty ruletables', >>> +'fw settings save and restart' =3D> 'Save and Restart', >>> 'fwdfw ACCEPT' =3D> 'ACCEPT', >>> 'fwdfw DROP' =3D> 'DROP', >>> 'fwdfw MODE1' =3D> 'Drop all packets', >>> --=20 >>> 2.18.0 >>>=20 >>=20 >=20 --===============5514063357708204799==--