From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: development@lists.ipfire.org Subject: Re: [PATCH] core 130: Remove snort settings dir after convert has run. Date: Mon, 18 Mar 2019 20:04:55 +0100 Message-ID: In-Reply-To: <78170DA8-81DA-4895-BD9A-617321EB6E28@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4346495403121199719==" List-Id: --===============4346495403121199719== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable > Almost? As long as the files are present, the settings will be converted. May in special cases if a user does something really weird may the converter will fail, but in this case I think it even would be better start a new clean IPS configuration. >=20 > How is this directory removed when a backup was restored? >=20 By the backup.pl script. It checks if after the backup a snort settings dir (/var/ipfire/snort) exists, launches the converter and afterwards deletes the directory. See: https://git.ipfire.org/?p=3Dipfire-2.x.git;a=3Dcommit;h=3D8c27372438dd267648c= ba48b86d85a594f14be1c > -Michael >=20 > > On 18 Mar 2019, at 18:56, Stefan Schantl > > wrote: > >=20 > > Hello Michael, > > > Hi, > > >=20 > > > What happens when the converter has failed? Is that a > > > possibility? > >=20 > > There is almost no risk, that this would be happened. > >=20 > > It contains checks if all corresponding files are present and will > > contain the settings from them - I do not see a case where any > > problems > > can be happen. > >=20 > > Best regards, > >=20 > > -Stefan > >=20 > > > -Michael > > >=20 > > > > On 18 Mar 2019, at 18:46, Stefan Schantl < > > > > stefan.schantl(a)ipfire.org > > > > > wrote: > > > >=20 > > > > When all settings have been converted, the files and directory > > > > are > > > > not > > > > needed anymore. > > > >=20 > > > > If they will be left and at a later time an backup will be > > > > restored, the > > > > converter will be started by the backup script again and would > > > > be > > > > restore those > > > > old snort settings and replace the current IPS settings. > > > >=20 > > > > Signed-off-by: Stefan Schantl > > > > --- > > > > config/rootfiles/core/130/update.sh | 3 +++ > > > > 1 file changed, 3 insertions(+) > > > >=20 > > > > diff --git a/config/rootfiles/core/130/update.sh > > > > b/config/rootfiles/core/130/update.sh > > > > index d33321c32..f3dc0d85a 100644 > > > > --- a/config/rootfiles/core/130/update.sh > > > > +++ b/config/rootfiles/core/130/update.sh > > > > @@ -74,6 +74,9 @@ ldconfig > > > > # Migrate snort configuration to suricata > > > > /usr/sbin/convert-snort > > > >=20 > > > > +# Remove snort settings > > > > +rm -rvf /var/ipfire/snort > > > > + > > > > # Start services > > > > /etc/init.d/collectd restart > > > > /etc/init.d/firewall restart > > > > --=20 > > > > 2.20.1 > > > >=20 --===============4346495403121199719== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRSXpCQUFCQ2dBZEZpRUVXTzBOWHRTcnZo YXN5dERuVHRkT0ZZK1RzdDRGQWx5UDY5Y0FDZ2tRVHRkT0ZZK1QKc3Q3S3Z3LytLeGVzWVg3Wm9R cmh1b1VNSXhsVVJpMUNwN2JpYVltaDh3MmNVTDlwU3lxVmU3YTlTNmlxWFdHdApXMHdBRkZVSlhn WGxNOENERnUvV1dlckRMeXJ3MWRQT2trdXp3MEpUY0ZpNmlUYk1PMzV0TWU5b05pUHRHekw0Cm95 NWxQOVpZWUthQytrZjhXRzVUT1pUNk94WW90eTMrdUprWHJkTXQvUHUxMGtJWEpQMTc3TW9NQTB1 cWN6WEMKRkhuNnkwM1FkMjBSdXFKWTFRYklVQjFOUEZsTDZKLzFwUHk1MHh1YnJvcHQycEZNT1Vh YkRMZ3h0WUtpMXRHZwpjVXNSUElGNEE2OHRqblR3enVGNHlDRlNjU2Ria1NiTm9LU3NDZmdwSXh5 V2NOR212VHAvcHZTSXE3LzNPbk1RCkkwTlI3RXIyRjU5QSt3QllXUjNGbVNWZHRWQmF6RlNYMzVx d1JQVVFheEt4L1BlMGw3TldBc0VZM1VBT3JSelIKaG8yRzJNQ00zV1h0RFU5VWVGS3RHT2U3dUJD R3Q1ZEZ1M0JHRmlNbzlzS2JWNjZsQTRWS2xISmNyQzVNbjJJegpMME1OdGlT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