Commit Graph

387 Commits

Author SHA1 Message Date
Peter Müller
3486440720 Housekeeping: Only mark files as executable if they have to be
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2023-05-11 20:19:20 +00:00
Stefan Schantl
41d3d33dde update-ipblocklists: Fix loading new blocklists after update
* The script needs to run with root permissions in order to
  do the ipset operations. So remove code to drop the permissions
  on startup.

* Adjust execute calls to use the proper functions from
  general functions.

* Add some code to set the correct ownership (nobody:nobody) for
  changed files during script runtime.

Fixes #13072.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2023-04-04 19:59:23 +00:00
Adolf Belka
c799e441a4 backupiso: Update to ISO file naming - bug#12932
- commit https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=fbd0608c2cb5372fff7857065ec7e605b1bf9cf7
   aligned the ISO file name to the image file name. This change also needed to be added
   to backupiso as the filename is used to download the iso from the IPFire server when
   creating an ISO backup.

Fixes: Bug#12932
Suggested-by: Matthias Fischer <matthias.fischer@ipfire.org>
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
2022-09-19 12:36:52 +00:00
Stefan Schantl
404b513794 ipblocklist: Add "v4" as extension to the ipset set names.
This easily allows us to swap the sets after updating, without
unloading them.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:27:14 +02:00
Stefan Schantl
82fea6d575 update-ipblocklists: Do not log the pid in syslog.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Stefan Schantl
ac8e283eb4 update-ipblocklist: Add code to reload updated blocklists.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Stefan Schantl
ec1878771a ipblocklist-update: Introduce script to automatically update blacklists.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:13 +02:00
Michael Tremer
71d53192d3 core168: Add script to automatically repair MDRAID arrays
Please see the header of the script for more details.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-05-30 18:59:34 +00:00
Stefan Schantl
e2f4f99e49 update-ids-ruleset: Silent script if no providers settings file exists.
Only try to read-in the providers settings file, in case it exists.
Otherwise the script produces an error message, about the missing file,
each time it gets executed.

Because of the fcron job this would be twice a day in most cases.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-05-13 20:38:45 +00:00
Peter Müller
4d4f5df0c8 Merge branch 'temp-stevee-idsv4' into next 2022-05-05 16:07:41 +00:00
Stefan Schantl
7c4b8df716 update-ids-ruleset: Skip unsupported providers.
In case a configured provider is not longer supported, simply skip it
and do not try to perform an update.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-17 15:02:41 +02:00
Stefan Schantl
39b5adb940 update-ids-ruleset: Only regenerate and reload ruleset on at least one
successfull update.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-11 05:57:05 +02:00
Peter Müller
74b372f8da backupiso: Change checksum algorithm to BLAKE2
Reported-by: Arne Fitzenreiter <arne.fitzenreiter@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-04-08 16:04:15 +00:00
Peter Müller
c60f6b3847 Core Update 166: Drop orphaned convert-ovpn script
This script only appeared in conjunction with Core Update 75, released
January 2014. Although it is still being executed while restoring a
backup, it would only be effective if anyone tried to restore a backup
created before C75.

I don't think there is a realistic need to carry this script along any
further. In doubt, it might be better to start from scratch again rather
than trying to restore an 8 year old backup, expecting everything to be
peachy and vanilla with it.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-03-31 09:50:59 +00:00
Stefan Schantl
ff780d8b3f update-ids-ruleset: Fix typo in return code.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-03-26 11:27:01 +01:00
Stefan Schantl
74019d3044 update-ids-ruleset: Skip providers which are not enabled.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-03-26 11:23:44 +01:00
Stefan Schantl
9a3f9c2b23 update-ids-ruleset: Log and abort if to less free disk space is
available.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-03-26 11:22:50 +01:00
Stefan Schantl
c9c3eadbbf update-ids-ruleset: Add logging for various events.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-03-26 11:22:08 +01:00
Stefan Schantl
d1f7542659 update-ids-ruleset: Add function to iherit with the syslog daemon.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-03-26 11:19:31 +01:00
Peter Müller
0b6d12adae Drop orphaned ovpn-ccd-convert script
This script appeared in the rootfiles for Core Updates 65 and 66, being
released in late 2012 and early 2013. It is not used elsewhere, and
there is no sense in keeping it around on IPFire installations.

Should this patch be accepted, a corresponding 'rm' statement is
necessary in the update.sh script of the Core Update it will go into.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-21 08:50:30 +00:00
Michael Tremer
46b8eb9e7f rebuild-initrd: Drop unused script
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-14 15:18:21 +00:00
Michael Tremer
2b7c6f8e92 dracut: Remove hard-coded configuration from command line
This is now configured globally in dracut

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-14 15:18:21 +00:00
Stefan Schantl
a956712e75 update-ids-ruleset: Always drop the lock file if it has been created during runtime.
In some situations or if an error happened, the lock file could be
keep on the system. In such a case the IDS page would be locked forever
until user interaction or reboot of the system.

Now the script checks if it has created such a lock and release it when
the script exists.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
2022-03-05 14:30:06 +00:00
Peter Müller
cf21dcaa97 Drop ovpn-collectd-convert
This script is orphaned: It was only used while upgrading to Core Update
89, sitting around in /usr/sbin/ doing nothing ever since.

Keeping it there won't do any harm. On the other hand, dragging an
unused script around on our installations does not make sense either.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-19 00:01:47 +00:00
Peter Müller
66c3619872 Early spring clean: Remove trailing whitespaces, and correct licence headers
Bumping across one of our scripts with very long trailing whitespaces, I
thought it might be a good idea to clean these up. Doing so, some
missing or inconsistent licence headers were fixed.

There is no need in shipping all these files en bloc, as their
functionality won't change.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-18 23:54:57 +00:00
Stefan Schantl
edad13b46b update-location-database: Export database to ipset compatible format now.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-15 18:07:17 +00:00
Peter Müller
86cf6898aa Merge branch 'master-IDSv3' into temp-c164-development 2022-01-14 14:05:10 +00:00
Stefan Schantl
27671216d5 update-ids-ruleset: Early exit script if lockfile exists.
This prevents from running the script while the WUI is performing
operations at the same time or to launch multiple instances of the
script.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:45 +01:00
Stefan Schantl
6875f9ce7c update-ids-ruleset: Port script to work with multiple providers.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:43 +01:00
Michael Tremer
6cf219c427 Drop support for i586
This patch removes support for i586 according to the decision being
taken over a year ago.

It removes the architecture from the build system and removes all
required hacks and other quirks that have been necessary before.

There is no need to ship any changed files to the remaining
architectures as the removed code branches have not been used.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-12-04 23:27:26 +01:00
Adolf Belka
cbf3a350ac makegraphs: Update script for new iostat output format - Bug#12702
- Modification of iostat line as per input in Bug#12702

Fixes: 12702
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:05:25 +00:00
Adolf Belka
74b9fcc65e hddshutdown: Update script for new iostat output format - Bug#12702
- Modification of iostat line as per input in Bug#12702

Fixes: 12702
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:05:13 +00:00
Arne Fitzenreiter
255273a36b set version to 2.27
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-08-01 11:51:14 +02:00
Arne Fitzenreiter
023f43ff40 makegraphs: fix status collection for hddshutdown
with kernel 5.10.x also the reading of s.m.a.r.t. data to update
the temperatur graphs is countet as disk read so update the stored
value after reading.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-07-14 08:12:16 +02:00
Jonatan Schlag
8186b37230 Hardcode theme to ipfire
This disables the theme support and makes it impossible to use any other
themes than the ipfire default theme.

The only intention of this patch is to hardcode the theme to ipfire.
To change any cgi we have is an ugly way, but the only way to do this
fast. The colour handling needs certainly to be improved as well, but
this will and should be done in other patches.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-08 10:11:34 +00:00
Michael Tremer
3358a84fd5 filesystem-cleanup: Ignore boost
This package does not behave according to standard distribution rules
and our script deletes all libraries

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-27 15:27:42 +00:00
Michael Tremer
6dc206ab69 Drop /usr/lib/sse2
This is now unused

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-16 18:00:16 +00:00
Michael Tremer
0de7cc50ac IPsec: Disable XFRM policy lookup for VTI devices
This speeds up throughput slightly

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-01-18 13:05:10 +00:00
Stefan Schantl
99659ce50b libloc: Only update database once a week
Ensure to download and update the database only once a week, even the
script will be called by cron each hour.

Fixes #12462.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-07-29 17:15:56 +00:00
Michael Tremer
2ae1c23f62 location: Restart IPsec after firewall was restarted
strongswan creates rules in iptables which are being dropped when
the firewall is being restarted.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-07-28 18:32:20 +00:00
Stefan Schantl
bbaf9bdf21 convert-to-location: Regenerate firewall chains.
The firewall chain for location based rules has been renamed to
LOCATIONBLOCK and therefore the fiewall needs to be restarted and
the chains regenerated.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-07-12 05:31:41 +00:00
Stefan Schantl
d047b493aa convert-to-location: Fix double patch declaration
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-07-12 05:31:39 +00:00
Stefan Schantl
f1d982cce6 Add convert-to-location converter.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2020-06-15 18:21:57 +02:00
Stefan Schantl
36331a6a9c update-location-database: Automatically export database after update.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2020-06-10 21:24:58 +02:00
Stefan Schantl
8b58dbf32a Merge branch 'switch-to-libloc' into next-switch-to-libloc 2020-05-25 19:58:54 +02:00
Arne Fitzenreiter
289a86a320 rootfiles: change MACHINE to xxxMACHINExxx
berkeley has a file that nane contain MACHINE wich should not
replaced by the build architecture.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-10 17:27:28 +00:00
Michael Tremer
616de0b48c openvpn: Store connection times in ASCII timestamps
This format seems to be a lot easier to handle in SQLite queries.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:18:17 +00:00
Michael Tremer
708f2b7368 openvpn: Add metrics script
This script is called when an OpenVPN Roadwarrior client
connects or disconnect and logs the start and duration
of the session.

This can be used to monitor session duration and data transfer.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:18:00 +00:00
Matthias Fischer
68a6d1053f makegraphs: 'vnstat -u' is no longer supported/needed
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-04-30 14:56:27 +00:00
Matthias Fischer
bd4f0794d2 consort.sh: Shebang-Typo
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-03-26 09:41:37 +00:00