logwatch: mdadm status missing - Fix for Bug 12080

- Addition of mdadm module to logwatch
- Addition of logwatch to sudoers list to run mdadm commands
- patch to change logwatch mdadm.conf to allow scan for raid drives, change mdadm script
   to run mdadm scan commands with sudo, allow clean but degraded drives to be listed
   in the output.

Fixes: 12080
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Adolf Belka
2021-10-06 15:48:35 +02:00
committed by Arne Fitzenreiter
parent 4ee445ce44
commit 1c71ff6b2c
4 changed files with 59 additions and 3 deletions

View File

@@ -74,6 +74,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
cd $(DIR_APP)/lib && patch < $(DIR_SRC)/src/patches/logwatch/logwatch-7.3.6-date_manip6.patch
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/logwatch/logwatch-7.5.4-disable_iptables.patch
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/logwatch/logwatch-7.5.5-enable-mdadm-sudo.patch
@cd $(DIR_APP) && chmod 755 install_logwatch.sh
cd $(DIR_APP) && yes "" | ./install_logwatch.sh
@@ -103,6 +104,11 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
chmod -v 755 /var/log/logwatch
-rm -rf /etc/logwatch/conf
ln -vsf /usr/share/logwatch/default.conf /etc/logwatch/conf
-mkdir -p /etc/sudoers.d
chmod -v 755 /etc/sudoers.d
install -v -m 644 $(DIR_SRC)/config/logwatch/sudoers/logwatch-mdadm \
/etc/sudoers.d/logwatch-mdadm
@rm -rf $(DIR_APP)
@$(POSTBUILD)