diff -Nur e-smith-base-5.8.0.old/createlinks e-smith-base-5.8.0/createlinks --- e-smith-base-5.8.0.old/createlinks 2020-11-11 21:39:57.056000000 -0500 +++ e-smith-base-5.8.0/createlinks 2020-11-11 21:54:35.542000000 -0500 @@ -605,7 +605,6 @@ my %service2order = ( # Start rsyslog up before network! - raidmonitor => "15", dhcpd => "65", 'local' => "99", ); @@ -657,6 +656,7 @@ systemd-update-utmp-runlevel.service systemd-user-sessions.service networking.service + mdmonitor.service )) { symlink("../$unit", @@ -664,6 +664,8 @@ or die "Can't symlink to root/usr/lib/systemd/system/$target.target.wants/$unit: $!"; } } +symlink("mdmonitor.service", + "root/usr/lib/systemd/system/raidmonitor.service") # languages links foreach (qw(fr-be fr-lu fr-mc fr-ch)) diff -Nur e-smith-base-5.8.0.old/root/sbin/e-smith/systemd/mdmonitor-pre e-smith-base-5.8.0/root/sbin/e-smith/systemd/mdmonitor-pre --- e-smith-base-5.8.0.old/root/sbin/e-smith/systemd/mdmonitor-pre 1969-12-31 19:00:00.000000000 -0500 +++ e-smith-base-5.8.0/root/sbin/e-smith/systemd/mdmonitor-pre 2020-11-11 21:41:25.899000000 -0500 @@ -0,0 +1,10 @@ +#!/bin/sh +count=$(sed -n '/[0-9]\s\+[^ ]\+[^0-9]$/p;/[0-9]\s\+\(rd\|ida\|cciss\|i2o\)\/[^ ]\+[^0-9p][0-9]\+$/p' /proc/partitions | wc -l) +if [ $count -ge 2 ] +then + exit 0 +else + echo "Only $count drive(s) in this system - disabling raid monitoring" + exit 1 +fi + diff -Nur e-smith-base-5.8.0.old/root/usr/lib/systemd/system/mdmonitor.service.d/50koozali.conf e-smith-base-5.8.0/root/usr/lib/systemd/system/mdmonitor.service.d/50koozali.conf --- e-smith-base-5.8.0.old/root/usr/lib/systemd/system/mdmonitor.service.d/50koozali.conf 1969-12-31 19:00:00.000000000 -0500 +++ e-smith-base-5.8.0/root/usr/lib/systemd/system/mdmonitor.service.d/50koozali.conf 2020-11-11 21:45:02.207000000 -0500 @@ -0,0 +1,11 @@ +[Service] +#this one to erase previous +ExecStart= +#Koozali +ExecStartPre=/sbin/e-smith/service-status raidmonitor +ExecStartPre=/sbin/e-smith/systemd/mdmonitor-pre +ExecStart=/sbin/mdadm --monitor --scan --program /sbin/e-smith/mdevent --pid-file=/var/run/mdadm/mdadm.pid + +[Install] +Alias=raidmonitor.service +WantedBy=sme-server.target