Commit Graph

1424 Commits

Author SHA1 Message Date
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
Arne Fitzenreiter
7275d72be3 cpufrequtils: hide output on disabled cores.
We disable cores if the are affected by some cpu vulnerabilities
this cores report errors if you try to change the settings.
So only print the output for core0 and hide it for all cores.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-02-18 11:38:29 +01:00
Arne Fitzenreiter
d36a58ef6b cpufrequtils: fix initskript for amd-pstate
the initskript loads a test-modul for amd-pstate (which traces on intel)
and off course reports errors if firmware settings are missing.

this also fix the error at start because also amd-pstate doesn't support
ondemand mode.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-02-16 16:17:47 +01:00
Michael Tremer
935da8b7a2 The IPFire time service has moved to time.ipfire.org
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-02-14 11:52:36 +00:00
Adolf Belka
37c5b4b62e firewall: Fixes bug12981 - add if loop to log or not log dropped hostile traffic
- This v3 version now has two if loops allowing logging of incoming drop hostile or
   outgoing drop hostile or both or neither.
- Dependent on the choice in optionsfw.cgi this loop will either log or not log the
   dropped hostile traffic.

Fixes: bug12981
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-02-07 11:02:17 +00:00
Michael Tremer
500b6311b4 collectd: Do not sync
Calling a global sync operation manually is generally a bad idea as it
can block for forever. If people have storage that does not retain
anything that is being written to it, they need to fix their hardware.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-01-31 10:30:27 +00:00
Arne Fitzenreiter
9786225a9b mympd: new addon to control mpd via WebGUI
myMPD is written in C and has a nice WebGUI to play
local music and also a WebRadio browser.
This is to replace the removec client175.

After install it can reached via
https://IP_OF_THE_IPFIRE:8800

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-01-29 16:02:42 +00:00
Erik Kapfer
e5a77641f3 Firewall initscript: Restore Tor IPTable rules by manual firewall restart
If the firewall will be manually restart via '/etc/init.d/firewall restart',
the IPTable rules for the Tor relay will be deleted since 'iptables_init' only
flushes and creates inbound and unbound chains for Tor but does not restore the
ruleset from Tor initscript.

For reference and tests please see -->
https://community.ipfire.org/t/tor-stop-working-without-stop-the-process-or-give-an-error-message/10697

Signed-off-by: Erik Kapfer <erik.kapfer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-01-19 16:37:44 +00:00
Michael Tremer
b87cd867f7 network: Only try to restart collectd if it is running
This updated version of this script avoids any errors if collectd is not
running (yet) which might happen during the boot process.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-01-19 16:37:24 +00:00
Michael Tremer
f2d7d4ec16 collectd: Restart is required after reconnect
The "ping" plugin does not re-resolve the gateway IP address after
pinging it for the first time. For most people this won't be a big
problem, but if the default gateway changes, the latency graph won't
work any more.

In order to do re-resolve "gateway", the only way is to restart
collectd.

Fixes: #13522
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
2024-01-14 16:04:03 +00:00
Michael Tremer
2ee8edb81a wsdd: Call it by its full name
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
2024-01-11 16:18:46 +01:00
Michael Tremer
c082a0cc9a wsdd: Add a restart command
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
2024-01-11 16:17:09 +01:00
Michael Tremer
bf3f602e05 wsdd: Create the chroot directory only on start
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
2024-01-11 16:15:43 +01:00
Michael Tremer
06c2bfa3c4 wsdd: Compose the ARGS array only when we need it
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
2024-01-11 16:15:13 +01:00
Michael Tremer
749b93c6e9 wsdd: Append --interface switches to the arguments array
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
2024-01-11 16:14:11 +01:00
Michael Tremer
43c2dc9318 wsdd: Securely parse the workgroup name
Because of a single variable being passwd with the workgroup, it would
have been possible to inject shell commands here. Passing it in the
array prevents that.

Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
2024-01-11 16:11:53 +01:00
Michael Tremer
bb88fd1b69 wsdd: Collect static command line arguments in an array
This is easier to handle than a large number of variables.

Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
2024-01-11 16:10:04 +01:00
Michael Tremer
cf70bd231a wsdd: Use long options for clarity
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
2024-01-11 16:07:04 +01:00
Michael Tremer
b95afd6aca wsdd: Reindent initscript
No spaces. Just tabs.

Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
2024-01-11 16:05:29 +01:00
Michael Tremer
5cf3bc3507 wsdd: Simplify starting/stopping and checking wsdd
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
2024-01-11 16:02:29 +01:00
Adolf Belka
605217e96f wsdd: Install wsdd - fixes bug13445
- lfs and toorfile created for wsdd
- wsdd added to make.sh script
- created install/update/uninstall scripts for wsdd that create an unpriveleged user and
   group.
- initscript created for wsdd. As wsdd is a python3 script, when it is run as a daemon the
   pidof command does not find any pid for wsdd. So a directory/file for a pid file was
   created. This is then passed to the loadproc and killproc commands. After the loadproc
   command has been created the pid is extracted from the ps aux command and put into the
   pid file. This then works when running the killproc command for it to know what to go
   and stop. The statusproc command does not have the ability to feed in the pid from a
   pid file and so it fails to find a running wsdd as it uses the pidof command. Code was
   added to the status section of the initscript to check if the pid file exists and if so
   to print the same command as used with the statusproc command, and also the same
   wording if the pid file does not exist because wsdd is not running.
- info from the ethernet/settings file is used to identify if only green0 is available or
   if blue0 is also used and based on this the appropriate interface commands are added to
   the wsdd command.
- wsdd is also set up to run in a chroot
- Has been tested on my vm testbed, initially by editing the files on the vm clone. After
   everything confiremd to be working, the build was successfully carried out and the
   .ipfire package was copied to a new vm clone installed and shown to perform as expected.
   This test only confirms that wsdd is correctly installed and started. Shutsdown and
   restarts on reboot successfully. Confirmed from the ps aux info that wsdd has been
   started with the correct options. Thge testing can not evaluate if wsdd enables windows
   systems newer than version 7 top be able to detect the samba shares as I have no
   windows systems.

Fixes: Bug13445
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2024-01-11 16:00:58 +01:00
Michael Tremer
c3019331df initscripts: Implement storing PIDs in loadproc
Some programs do not write their own PID files any more, but since our
initscripts heavily rely on those, this extension allows to store it
easily.

Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
2024-01-11 15:59:34 +01:00
Michael Tremer
dd8ef8cc10 initscripts: Fix wrong variable check for $PIDFILE in getpids
getpids() checked whether it needed to pass a pid file to pidofproc, but
the check was inverted.

Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
2024-01-11 15:57:50 +01:00
Arne Fitzenreiter
cb58d049e0 alsa: don't report failed module loads
this will stop pakfire if the kernel was updated before the alsa update.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2023-12-19 11:35:53 +01:00
Michael Tremer
ece94c7edf apache2: Properly re-execute Apache on restart
Previously, we sent Apache a signal to relaunch itself which caused
Apache to kill all child processes, and re-execute them.

However, when updating glibc, any newly compiled modules could not be
loaded as Apache was running with the previous version of glibc until
the next reboot.

This change will now properly stop Apache and restart it which solves
this problem.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-11-27 11:26:00 +00:00
Jonatan Schlag
6361fa73c6 network startup: Always cleanup before red gets started
There is no sense in doing this only in /etc/init.d/network
and not in /etc/init.d/networking/red

This files should be always deleted before a startup

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-09-05 15:15:53 +00:00
Jonatan Schlag
f2e90a6e0e network scripts: remove check for AUTOCONNECT
This setting is also old (2007) and cannot be set via the webinterface
anymore. So why checking for something, which can only be true.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-09-05 15:15:53 +00:00
Jonatan Schlag
100cd24a17 network initscripts: Remove code for old zone scheme
A long time ago (2007) there were more config types possible then 1, 2, 3
and 4. As our installer currently only accepts config type out of the set
1, 2, 3 and 4 we do not need to check if our CONFIG_TYPE is in this set.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-09-05 15:15:53 +00:00
Jonatan Schlag
8ae238a588 Use bash as shebang in network initscripts
/bin/sh is a symlink to /bin/bash on ipfire systems. Using /bin/sh in
the scripts as shebang hurts in two ways:

1. We use features which do not work with sh as shell. This is not
   really a problem but if we rely on features of a real bash we can
   state this clearly.
2. The syntay highlighting in vim does not work without a correct
   shebang. As I want and need correct syntax highlighting I propose to
   change the shebang.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-09-05 15:15:53 +00:00
Michael Tremer
d4a8484eb1 mountfs: Remove excessive sync-ing before umount
The system should perform all write operations when sync is called and
only return when the write queues are empty.

There is no additional benefit for calling sync again as the buffers
should be empty. If data is still being lost, then that is a bug in
either the storage device or driver.

As the (re-)boot process is already so slow, I would like to get rid of
any unnecessary delays.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-15 09:48:35 +00:00
Michael Tremer
21d8c56c8a mountfs: Mount ExtraHD filesystems
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-15 09:47:25 +00:00
Arne Fitzenreiter
cd78363404 Merge remote-tracking branch 'origin/master' into next
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2023-08-12 16:48:54 +02:00
Arne Fitzenreiter
41e3393152 initskript: smt: restore IPFire banner
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2023-08-12 09:58:56 +02:00
Arne Fitzenreiter
f41a54a2ea initskript: smt: disable smt on vulnerable cpu
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2023-08-12 09:11:52 +02:00
Adolf Belka
0803c50f76 red: Fixes bug#13164 adjust pppoe plugin name in red initscript
- This patch goes together with the patch for the ppp update to 2.5.0
- The rp-pppoe.so option is no longer available. There is only the pppoe.so available now

Fixes: Bug#13164
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-07 14:12:55 +00:00
Michael Tremer
91443f9234 udev: Drop hwrng rules
This is another fragment of rngd - the gift that keeps giving.

The udev rules file contains a lot of stuff for a prototype which never
went into production. So, that can be dropped.

It would have been left with one rule that starts rngd whenever a HWRNG
is being found. That is however no longer needed as rngd is being
started in the init process. We no longer need to initialize it as early
as possible to seed the kernel's PRNG.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-07-31 13:47:31 +00:00
Arne Fitzenreiter
0bb82a95dd initskripts: remove buggy remount at halt and reboot
mount -f does nothing and also the sync calls should do nothing
on a already ro mounted filesystem.

fixes: #13195

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-07-28 16:06:54 +00:00
Arne Fitzenreiter
f24ce4558a partresize: enable journal on ssd's and vm's
the flashimage is build without journal to not destroy
usb thumbdrives or sd cards. On real ssd's and virtual
machines it should enabled for higher data security.

So this patch add the journal is drive support smart.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-06-15 09:25:59 +00:00
Arne Fitzenreiter
36a19f2b39 partresize: remove buggy code
DRV is not defined so this code is useless.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-06-15 09:25:59 +00:00
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
Adolf Belka
0921556c85 initscripts: removal of lvmetad initscript
- With the last update of lvm2 lvmetad was removed from lvm2. I did not recognise that
   lvmetad had been setup as an automatic initscript, so it no longer works as the
   binary is no longer provided.
- This patch removes the lvmetad initscript, the reference to lvmetad in the initscript
   lfs file and the lvmetad initscript entries in the rootfile for each architecture.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2023-05-11 20:08:07 +00:00
Arne Fitzenreiter
946a27a28c initskripts: add OrangePi R1 Plus LTS
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2023-05-02 19:33:43 +00:00
Michael Tremer
aac0baea15 firewall: Drop legacy rules for PPPoE/PPTP
These rules where created to permit any local traffic to the firewall
when using a PPP connection that utilised Ethernet as transport.

This is however nonsensical and a security issue for any other
connection methods that call the RED interface "red0" and use PPP (e.g.
QMI).

Since PPPoE packets do not flow through iptables, these rules can be
dropped safely. We do not know whether PPTP works at all these days.

Fixes: #13088 - firewall: INPUT accepts all packets when using QMI for dial-in
Tested-by: Stefan Schantl <stefan.schantl@ipfire.org>
Tested-by: Arne Fitzenreiter <arne_f@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-04-24 18:44:39 +00:00
Adolf Belka
f4b849cb3f rng-tools: Move from core package to addon - fixes bug 12900
- This patch is to move the rng-tools package from a core package to an addon. With the
   kernel changes from 5.6 rngd is no longer needed to create the required kernel entropy.
- The results from HRNG's via rngd are used with an XOR after the entropy is
   collected by the kernel. So the HWRNG output is used to dilute the kernel random number
   data, which is already merged from several sources.
- Based on the above and @Paul's request in the bug report to have rng-tools kept as an
   addon this patch set is submitted for consideration to keep rng-tools but as an addon.
- move rng-tools rootfile from common to packages
- Modify rng-tools lfs from core package to addon package
- Create rng-tools pak to install and uninstall - creating rc.d links for start & stop.
- Move rngd initscript from system to packages directory.
- Installed into my vm testbed and confirmed that it works. No rngd daemon installed
   from iso install. After addon install rngd is present and running. Added various files
   to be able to test the services wui page. rngd shows up and can be turned off and on

Fixes: Bug#12900
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
2023-03-04 13:55:31 +00:00
Michael Tremer
763686527e Merge branch 'master' into next 2023-02-21 10:15:04 +00:00