1 |
diff -Nur e-smith-base-5.8.0.old/createlinks e-smith-base-5.8.0/createlinks |
2 |
--- e-smith-base-5.8.0.old/createlinks 2020-11-11 21:39:57.056000000 -0500 |
3 |
+++ e-smith-base-5.8.0/createlinks 2020-11-11 21:54:35.542000000 -0500 |
4 |
@@ -605,7 +605,6 @@ |
5 |
my %service2order = |
6 |
( |
7 |
# Start rsyslog up before network! |
8 |
- raidmonitor => "15", |
9 |
dhcpd => "65", |
10 |
'local' => "99", |
11 |
); |
12 |
@@ -657,6 +656,7 @@ |
13 |
systemd-update-utmp-runlevel.service |
14 |
systemd-user-sessions.service |
15 |
networking.service |
16 |
+ mdmonitor.service |
17 |
)) |
18 |
{ |
19 |
symlink("../$unit", |
20 |
@@ -664,6 +664,8 @@ |
21 |
or die "Can't symlink to root/usr/lib/systemd/system/$target.target.wants/$unit: $!"; |
22 |
} |
23 |
} |
24 |
+symlink("mdmonitor.service", |
25 |
+ "root/usr/lib/systemd/system/raidmonitor.service") |
26 |
|
27 |
# languages links |
28 |
foreach (qw(fr-be fr-lu fr-mc fr-ch)) |
29 |
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 |
30 |
--- e-smith-base-5.8.0.old/root/sbin/e-smith/systemd/mdmonitor-pre 1969-12-31 19:00:00.000000000 -0500 |
31 |
+++ e-smith-base-5.8.0/root/sbin/e-smith/systemd/mdmonitor-pre 2020-11-11 21:41:25.899000000 -0500 |
32 |
@@ -0,0 +1,10 @@ |
33 |
+#!/bin/sh |
34 |
+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) |
35 |
+if [ $count -ge 2 ] |
36 |
+then |
37 |
+ exit 0 |
38 |
+else |
39 |
+ echo "Only $count drive(s) in this system - disabling raid monitoring" |
40 |
+ exit 1 |
41 |
+fi |
42 |
+ |
43 |
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 |
44 |
--- 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 |
45 |
+++ e-smith-base-5.8.0/root/usr/lib/systemd/system/mdmonitor.service.d/50koozali.conf 2020-11-11 21:45:02.207000000 -0500 |
46 |
@@ -0,0 +1,11 @@ |
47 |
+[Service] |
48 |
+#this one to erase previous |
49 |
+ExecStart= |
50 |
+#Koozali |
51 |
+ExecStartPre=/sbin/e-smith/service-status raidmonitor |
52 |
+ExecStartPre=/sbin/e-smith/systemd/mdmonitor-pre |
53 |
+ExecStart=/sbin/mdadm --monitor --scan --program /sbin/e-smith/mdevent --pid-file=/var/run/mdadm/mdadm.pid |
54 |
+ |
55 |
+[Install] |
56 |
+Alias=raidmonitor.service |
57 |
+WantedBy=sme-server.target |