Commit Graph

1468 Commits

Author SHA1 Message Date
Jonatan Schlag
80c1cb5a0a initscripts fkt: Fix shebang
We use features only available in bash. So we should state correctly
that the script should be executed in bash. As sh is a symlink to bash
this makes not differences on a ipfire system. But my linter is less
chatty with this change.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-24 12:19:56 +00:00
Jonatan Schlag
14ecdd86f1 initscripts fkt: keep readhash compatible with older implementation
With the use of eval BLUE_DEV='blue0 net0' stored "blue0 net0" in the
variable BLUE_DEV not "'blue0 net0'"

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-24 12:19:56 +00:00
Jonatan Schlag
f1d94e7457 initscripts fkt: readhash should only parse lines with a =
A line without a = is clearly invalid.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-24 12:19:56 +00:00
Jonatan Schlag
9f72b7bc5f initscripts fkt: Check for invalid values in readhash
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-24 12:19:56 +00:00
Jonatan Schlag
02254f5543 initscripts fkt: ignore invalid keys in readhash
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-24 12:19:56 +00:00
Jonatan Schlag
d289bc28be initscripts fkt: Ignore comments in readhash
As '#Another Comment' is a valid key we test this change by checking if
the comments do not end up as keys in our array.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-24 12:19:56 +00:00
Jonatan Schlag
59e3c2a217 initscript fkt: ignore blank lines in readhash
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-24 12:19:56 +00:00
Jonatan Schlag
96bb3ba8b8 initscript functions: add readhash
To avoid the usage of eval and to store the config in an key value
array, we introduce an new function. The tests only check if we
read the correct value to the correct variable.

One comment on the implementation as this has created some headache:

>From https://www.gnu.org/software/bash/manual/bash.html#Bourne-Shell-Builtins

	"When used in a function, declare makes each name local, as with the local command, unless the -g option is used."

So we need to use -g here

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-24 12:19:56 +00:00
Stefan Schantl
823ece817f suricata: Use correct red device when using QMI
When using QMI the dial-in option has to be set to "ppp" during setup.

In this case the initscript of suricata will create all related firewall
rules for the ppp0 interface which is not correct when using QMI where
the RED device is called red0.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-18 12:46:14 +00:00
Michael Tremer
10210334fe Merge remote-tracking branch 'ms/cleanup' into next 2024-07-24 16:32:28 +00:00
Michael Tremer
175ba983f4 firewall: Implement generating SYNPROXY rules
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-07-02 09:30:28 +00:00
Michael Tremer
8711955b38 firewall: Enable SYNPROXY for untracked packets
This enables some DoS protection using SYNPROXY which will complete a
SYN handshake with the client before the connection is being forwarded.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-07-02 09:30:28 +00:00
Michael Tremer
be2774c0c6 firewall: Don't filter output INVALID packets
This should never cause any problems, but will cause that certain more
complicated featured like SYNPROXY won't work.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-07-02 09:30:28 +00:00
Michael Tremer
6342bb596b firewall: Split CONNTRACK chain
This is preparation to handle incoming/outgoing packets differently.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-07-02 09:30:28 +00:00
Michael Tremer
7825fd0f4b Revert "oci-setup: Fixes bug12763"
This reverts commit 238a47874f.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-05-19 10:01:38 +02:00
Michael Tremer
731d944b2b Revert "gcp-setup: Fixes bug12763"
This reverts commit 2841a67548.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-05-19 10:01:21 +02:00
Michael Tremer
d10fa6e64b Revert "exoscale-setup: Fixes bug12763"
This reverts commit 3162b6ccfa.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-05-19 10:01:11 +02:00
Michael Tremer
3bacd534a9 Revert "azure-setup: Fixes bug12763"
This reverts commit 1db5f96c5e.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-05-19 10:01:00 +02:00
Michael Tremer
d8c4aaddc3 Revert "aws-setup: Fixes bug12763"
This reverts commit eb0de6531c.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-05-19 10:00:45 +02:00
Michael Tremer
d258c7a47a Revert "red: Fixes bug12763"
This reverts commit 9c28cd59c1.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-05-19 10:00:23 +02:00
Michael Tremer
bafa45ed84 Revert "static-routes: Fixes bug12763"
This reverts commit e33ee46e62.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-05-19 10:00:11 +02:00
Michael Tremer
1724e5ac0a initscripts: Correctly wait for Apache2 to terminate
This is achieved by telling killproc which PIDs to wait for.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-04-28 17:23:41 +00:00
Michael Tremer
66db90757a Remove RECONNECTION=dialondemand
We don't support this at all and so we don't need to check any more.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:35:47 +02:00
Michael Tremer
db09ea9e5c initscripts: Don't overwrite the PID file
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:32:54 +02:00
Michael Tremer
3f863ee70d initscripts: Add some basic functions for IP address maths
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:32:40 +02:00
Michael Tremer
5900a95059 initscripts: Fix reading PIDs
An incorrect variable has been used.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:31:36 +02:00
Michael Tremer
6e47a143c9 initscripts: Handle command arguments as array
For some reason, the function is refusing to launch a command that has
extra arguments.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:31:24 +02:00
Michael Tremer
e340d393d3 network: Don't include initscript headers twice
Everywhere we import the functions, we have already imported the
standard includes.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:31:08 +02:00
Adolf Belka
238a47874f oci-setup: Fixes bug12763
- This ensures that all ip route and ip rule commands are redirected to null if the output
   is not used to feed into a variable.
- This will prevent any error messages related to empty iproute tables being displayed
   during boot if an empty table is accessed.

Fixes: Bug#12763
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-04-19 18:41:33 +00:00
Adolf Belka
2841a67548 gcp-setup: Fixes bug12763
- This ensures that all ip route and ip rule commands are redirected to null if the output
   is not used to feed into a variable.
- This will prevent any error messages related to empty iproute tables being displayed
   during boot if an empty table is accessed.

Fixes: Bug#12763
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-04-19 18:41:17 +00:00
Adolf Belka
3162b6ccfa exoscale-setup: Fixes bug12763
- This ensures that all ip route and ip rule commands are redirected to null if the output
   is not used to feed into a variable.
- This will prevent any error messages related to empty iproute tables being displayed
   during boot if an empty table is accessed.

Fixes: Bug#12763
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-04-19 18:41:05 +00:00
Adolf Belka
1db5f96c5e azure-setup: Fixes bug12763
- This ensures that all ip route and ip rule commands are redirected to null if the output
   is not used to feed into a variable.
- This will prevent any error messages related to empty iproute tables being displayed
   during boot if an empty table is accessed.

Fixes: Bug#12763
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-04-19 18:40:54 +00:00
Adolf Belka
eb0de6531c aws-setup: Fixes bug12763
- This ensures that all ip route and ip rule commands are redirected to null if the output
   is not used to feed into a variable.
- This will prevent any error messages related to empty iproute tables being displayed
   during boot if an empty table is accessed.

Fixes: Bug#12763
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-04-19 18:40:41 +00:00
Adolf Belka
9c28cd59c1 red: Fixes bug12763
- This ensures that all ip route and ip rule commands are redirected to null if the output
   is not used to feed into a variable.
- This will prevent any error messages related to empty iproute tables being displayed
   during boot if an empty table is accessed.

Fixes: Bug#12763
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-04-19 18:40:15 +00:00
Adolf Belka
e33ee46e62 static-routes: Fixes bug12763
- This ensures that all ip route and ip rule commands are redirected to null if the output
   is not used to feed into a variable.
- This will prevent any error messages related to empty iproute tables being displayed
   during boot.
- Tested on my vm system and confirmed that the fix in ipsec-interfaces stops the "FIB
   table does not exist" and "RTNETLINK answers: no such file or directory" messages during
   boot.

Fixes: Bug#12763
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-04-19 18:39:56 +00:00
Adolf Belka
4ed125ae66 sslh: Removal of sslh addon
- As discussed in the Dev conf call on 2024-Apr-08
- sslh has not been functioning since last update ion Sep 2021. Configuration syntax
   was radically changed somewhere in the update from 1.7a(2013) to 1.22c in Sep 2021
- removal of sslh from make file
- removal of lfs file
- removal of rootfile
- removal of paks files
- removal of initscript

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-04-19 06:06:37 +00:00
Stefan Schantl
b25236acf7 grub-btrfsd: Drop redundant used PIDFILE mechanism
This case is already covered by the PID mechanism of the used functions

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-04-02 19:25:47 +00:00
Stefan Schantl
e348f67fa6 grub-btrfsd: Adjust displayed starting message
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-04-02 19:25:35 +00:00
Stefan Schantl
6da6f5dbe2 grub-btrfsd: Use generic volume_fs_type function for FS detection
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-04-02 19:25:15 +00:00
Stefan Schantl
ed91103e22 initscripts: Add generic function to get the filesystem type of a volume
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-04-02 19:25:00 +00:00
Arne Fitzenreiter
2d4f4ebfa2 Merge remote-tracking branch 'origin/master' into next
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-03-31 13:36:08 +02:00
Michael Tremer
56d32cbe91 frr: Update reloading all services
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-03-30 12:14:37 +00:00
Michael Tremer
7c6b05dfb8 frr: Start the management daemon, too
This daemon is running the configuration validation and required to run
at all times.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-03-30 12:14:37 +00:00
Stefan Schantl
a6d5b71f2c grub-btrfs: New package
This kind of grub addon will extend the grub boot menu by a additional
submenu where a BTRFS snapshot can be selected to directly use as root
volume and boot into it.

The grub-btrfsd daemon is using inotify(tools) to watch the snapshot directory for
new or deleted snapshots and calls grub-mkconfig to adjust the snapshot grub submenu

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-03-26 07:36:17 +00:00
Arne Fitzenreiter
77bae935e6 cpufrequtils: remove cpufrequtils
the only file in the package is now the initskript to configre powersave mode using cpupower
which is shipped with the kernel.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-03-20 17:49:27 +01:00
Adolf Belka
cfb0ced3c4 wsdd: remove wsdd initscript as now covered by samba - fixes bug#13445
Fixes: bug#13445
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-03-19 11:13:59 +00:00
Adolf Belka
b1e521c8f1 samba: Integrate wsdd initscript into samba initscript - bug#13445
- This integrates the wsdd initscript functions into the samba initscript. When samba is
   started or stopped or the status requested then wsdd is part of that process.
- Tested in my vm testbed and confirmed to work for start, stop and status. Confirmed
   pid's shown with status command are in the appropriate pid files.

Fixes: bug#13445
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-03-19 11:13:59 +00:00
Michael Tremer
1c9dcaf976 Merge remote-tracking branch 'ms/initscripts' into next 2024-03-01 16:13:45 +00:00
Michael Tremer
bed265cc5a Merge remote-tracking branch 'ms/wsdd' into next 2024-02-28 16:44:06 +00:00
Arne Fitzenreiter
e56646a748 mpd: fix database path in initskript
i had forgotten this path after moving the database from
/var/ipfire/mpfire to /var/ipfire/mpd

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-02-25 09:49:10 +01:00