From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: Re: IPFire 2.29 - Core Update 185 is available for testing Date: Mon, 25 Mar 2024 16:02:42 +0100 Message-ID: <21c2dedc-1579-486e-89ea-539e5f5a85ce@ipfire.org> In-Reply-To: <171135811429.1850211.10643578824706352392.ipfire@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5941977205726240595==" List-Id: --===============5941977205726240595== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi All, I am having difficulty understanding something that is happening with the Cor= e Update to 185. I added the following code into the update.sh script # Check if the drop hostile in and out logging options need to be added # into the optionsfw settings file and apply to firewall if ! [ $(grep "LOGDROPHOSTILEIN=3Don" /var/ipfire/optionsfw/settings) ] && \ ! [ $(grep "LOGDROPHOSTILEOUT=3Don" /var/ipfire/optionsfw/settings) ]; th= en sed -i '$ a\LOGDROPHOSTILEIN=3Don' /var/ipfire/optionsfw/settings sed -i '$ a\LOGDROPHOSTILEOUT=3Don' /var/ipfire/optionsfw/settings /usr/local/bin/firewallctrl fi If I do an update with a Core Update 183 version that has the LOGDROPHOSTILEI= N and LOGDROPHOSTILEOUT entries in optionsfw/settings missing then the update= adds in the two lines shown. So working correctly. However if the Core Update 183 has the two entries already in the optionsfw/s= ettings file then the above code ends up with two more copies of each put int= o the file as following. FWPOLICY=3DDROP SHOWTABLES=3Don DROPPROXY=3Doff LOGDROPHOSTILEIN=3Don LOGDROPHOSTILEOUT=3Don LOGDROPHOSTILEIN=3Don LOGDROPHOSTILEOUT=3Don However if I take a vm with optionsfw/settings containing the two entries alr= eady and run the update code shown above manually via a script on the vm then= it does not add any extra lines in. If the vm has the two entries missing an= d I run the script manually then it adds in one entry for each. So I do not understand at all why the code I put into the update.sh file 1) Does not recognise that the entries already exist in the settings file. 2) Then prints the entries twice. when it is run in the update.sh via an upgrade. Any help with understanding what is going wrong with the code I wrote would b= e very much appreciated. Regards, Adolf. On 25/03/2024 10:15, IPFire Project wrote: > This update is another testing version for IPFire: It comes with the brand = release of the IPFire IPS, a number of bug fixes across the entire system and= a good amount of package updates. Test it while it's still hot! > =E2=80=8C=C2=A0=E2=80=8C=C2=A0=E2=80=8C=C2=A0=E2=80=8C=C2=A0=E2=80=8C=C2=A0= =E2=80=8C=C2=A0=E2=80=8C=C2=A0=E2=80=8C=C2=A0=E2=80=8C=C2=A0=E2=80=8C=C2=A0= =E2=80=8C=C2=A0=E2=80=8C=C2=A0=E2=80=8C=C2=A0=E2=80=8C=C2=A0=E2=80=8C=C2=A0= =E2=80=8C=C2=A0=E2=80=8C=C2=A0=E2=80=8C >=20 >=20 > IPFire_ >=20 >=20 > IPFire 2.29 - Core Update 185 is available for testing >=20 > This update is another testing version for IPFire: It comes with the brand = release of the IPFire IPS, a number of bug fixes across the entire system and= a good amount of package updates. Test it while it's still hot! >=20 > Read The Full Post On Our Blog >=20 > The IPFire Project, c/o Lightning Wire Labs GmbH, Gerhardstra=C3=9Fe 8, 457= 11 Datteln, Germany >=20 > Unsubscribe >=20 --===============5941977205726240595==--