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-17 22:17:37.171000000 -0500 |
3 |
+++ e-smith-base-5.8.0/createlinks 2020-11-17 22:51:57.118000000 -0500 |
4 |
@@ -303,6 +303,7 @@ |
5 |
|
6 |
templates2events("/etc/smartd.conf", $event); |
7 |
templates2events("/home/e-smith/ssl.pem/pem", $event); |
8 |
+templates2events("/usr/lib/systemd/system/dhcpd.service.d/50koozali.conf", $event); |
9 |
event_link("fix-startup", $event, "05"); |
10 |
event_link("systemd-default", $event, "05"); |
11 |
event_link("rotate_timestamped_logfiles", $event, "05"); |
12 |
@@ -437,6 +438,7 @@ |
13 |
|
14 |
$event = "post-install"; |
15 |
|
16 |
+templates2events("/usr/lib/systemd/system/dhcpd.service.d/50koozali.conf", $event); |
17 |
event_link("fix-startup", $event, "05"); |
18 |
event_link("systemd-default", $event, "05"); |
19 |
event_link("rotate_timestamped_logfiles", $event, "05"); |
20 |
@@ -453,6 +455,7 @@ |
21 |
|
22 |
$event = "post-upgrade"; |
23 |
|
24 |
+templates2events("/usr/lib/systemd/system/dhcpd.service.d/50koozali.conf", $event); |
25 |
event_link("fix-startup", $event, "05"); |
26 |
event_link("systemd-default", $event, "05"); |
27 |
event_link("rotate_timestamped_logfiles", $event, "05"); |
28 |
@@ -607,7 +610,6 @@ |
29 |
my %service2order = |
30 |
( |
31 |
# Start rsyslog up before network! |
32 |
- dhcpd => "65", |
33 |
'local' => "99", |
34 |
); |
35 |
|
36 |
@@ -616,10 +618,6 @@ |
37 |
service_link_enhanced($service, $service2order{$service}, 7); |
38 |
} |
39 |
|
40 |
-%service2order = |
41 |
-( |
42 |
- dhcpd => "K35", |
43 |
-); |
44 |
|
45 |
foreach my $service (keys %service2order) |
46 |
{ |
47 |
diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/templates/etc/rsyslog.conf/32dhcpd e-smith-base-5.8.0/root/etc/e-smith/templates/etc/rsyslog.conf/32dhcpd |
48 |
--- e-smith-base-5.8.0.old/root/etc/e-smith/templates/etc/rsyslog.conf/32dhcpd 1969-12-31 19:00:00.000000000 -0500 |
49 |
+++ e-smith-base-5.8.0/root/etc/e-smith/templates/etc/rsyslog.conf/32dhcpd 2020-11-17 22:42:25.789000000 -0500 |
50 |
@@ -0,0 +1,4 @@ |
51 |
+ |
52 |
+# dhcpd |
53 |
+:programname, isequal, "dhcpd" /var/log/dhcpd/dhcpd.log |
54 |
+:programname, isequal, "dhcpd" stop |
55 |
diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/dhcpd.service.d/50koozali.conf/40service e-smith-base-5.8.0/root/etc/e-smith/templates/usr/lib/systemd/system/dhcpd.service.d/50koozali.conf/40service |
56 |
--- e-smith-base-5.8.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/dhcpd.service.d/50koozali.conf/40service 1969-12-31 19:00:00.000000000 -0500 |
57 |
+++ e-smith-base-5.8.0/root/etc/e-smith/templates/usr/lib/systemd/system/dhcpd.service.d/50koozali.conf/40service 2020-11-17 22:43:50.325000000 -0500 |
58 |
@@ -0,0 +1,18 @@ |
59 |
+{ |
60 |
+$interface=$InternalInterface{'Name'}||"hum"; |
61 |
+$configfile='/etc/dhcpd.conf'; |
62 |
+$leasefile='/var/lib/dhcpd/dhcpd.leases'; |
63 |
+ |
64 |
+$OUT .=""; |
65 |
+} |
66 |
+[Service] |
67 |
+Type=notify |
68 |
+ExecStartPre=/sbin/e-smith/service-status dhcpd |
69 |
+ExecStartPre=/sbin/e-smith/expand-template {$configfile} |
70 |
+ExecStartPre=/bin/touch {$leasefile} |
71 |
+#first empty one is to delete original one, as ExecStart allow multiple entries |
72 |
+ExecStart= |
73 |
+ExecStart=/usr/bin/sh -c 'exec /usr/sbin/dhcpd -f -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases -user dhcpd -group dhcpd --no-pid {$interface} >>/var/log/dhcpd/current 2>>/var/log/dhcpd/current' |
74 |
+#for systemd >=240 |
75 |
+#StandardOutput=append:/var/log/dhcpd/current |
76 |
+#StandardError=inherit |
77 |
diff -Nur e-smith-base-5.8.0.old/root/etc/logrotate.d/dhcpd e-smith-base-5.8.0/root/etc/logrotate.d/dhcpd |
78 |
--- e-smith-base-5.8.0.old/root/etc/logrotate.d/dhcpd 1969-12-31 19:00:00.000000000 -0500 |
79 |
+++ e-smith-base-5.8.0/root/etc/logrotate.d/dhcpd 2020-11-17 22:41:00.218000000 -0500 |
80 |
@@ -0,0 +1,11 @@ |
81 |
+/var/log/dhcpd/current /var/log/dhcpd/dhcpd.log { |
82 |
+ missingok |
83 |
+ notifempty |
84 |
+ create 600 root root |
85 |
+ su root root |
86 |
+ postrotate |
87 |
+ /usr/bin/systemctl reload-or-try-restart dhcpd |
88 |
+ endscript |
89 |
+} |
90 |
+ |
91 |
+ |