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-17 22:17:37.171000000 -0500 +++ e-smith-base-5.8.0/createlinks 2020-11-17 22:51:57.118000000 -0500 @@ -303,6 +303,7 @@ templates2events("/etc/smartd.conf", $event); templates2events("/home/e-smith/ssl.pem/pem", $event); +templates2events("/usr/lib/systemd/system/dhcpd.service.d/50koozali.conf", $event); event_link("fix-startup", $event, "05"); event_link("systemd-default", $event, "05"); event_link("rotate_timestamped_logfiles", $event, "05"); @@ -437,6 +438,7 @@ $event = "post-install"; +templates2events("/usr/lib/systemd/system/dhcpd.service.d/50koozali.conf", $event); event_link("fix-startup", $event, "05"); event_link("systemd-default", $event, "05"); event_link("rotate_timestamped_logfiles", $event, "05"); @@ -453,6 +455,7 @@ $event = "post-upgrade"; +templates2events("/usr/lib/systemd/system/dhcpd.service.d/50koozali.conf", $event); event_link("fix-startup", $event, "05"); event_link("systemd-default", $event, "05"); event_link("rotate_timestamped_logfiles", $event, "05"); @@ -607,7 +610,6 @@ my %service2order = ( # Start rsyslog up before network! - dhcpd => "65", 'local' => "99", ); @@ -616,10 +618,6 @@ service_link_enhanced($service, $service2order{$service}, 7); } -%service2order = -( - dhcpd => "K35", -); foreach my $service (keys %service2order) { 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 --- e-smith-base-5.8.0.old/root/etc/e-smith/templates/etc/rsyslog.conf/32dhcpd 1969-12-31 19:00:00.000000000 -0500 +++ e-smith-base-5.8.0/root/etc/e-smith/templates/etc/rsyslog.conf/32dhcpd 2020-11-17 22:42:25.789000000 -0500 @@ -0,0 +1,4 @@ + +# dhcpd +:programname, isequal, "dhcpd" /var/log/dhcpd/dhcpd.log +:programname, isequal, "dhcpd" stop 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 --- 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 +++ 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 @@ -0,0 +1,18 @@ +{ +$interface=$InternalInterface{'Name'}||"hum"; +$configfile='/etc/dhcpd.conf'; +$leasefile='/var/lib/dhcpd/dhcpd.leases'; + +$OUT .=""; +} +[Service] +Type=notify +ExecStartPre=/sbin/e-smith/service-status dhcpd +ExecStartPre=/sbin/e-smith/expand-template {$configfile} +ExecStartPre=/bin/touch {$leasefile} +#first empty one is to delete original one, as ExecStart allow multiple entries +ExecStart= +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' +#for systemd >=240 +#StandardOutput=append:/var/log/dhcpd/current +#StandardError=inherit 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 --- e-smith-base-5.8.0.old/root/etc/logrotate.d/dhcpd 1969-12-31 19:00:00.000000000 -0500 +++ e-smith-base-5.8.0/root/etc/logrotate.d/dhcpd 2020-11-17 22:41:00.218000000 -0500 @@ -0,0 +1,11 @@ +/var/log/dhcpd/current /var/log/dhcpd/dhcpd.log { + missingok + notifempty + create 600 root root + su root root + postrotate + /usr/bin/systemctl reload-or-try-restart dhcpd + endscript +} + +