-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathe-smith-base-5.2.0-relocate_dhcpd_leases_file.patch
More file actions
35 lines (31 loc) · 1.63 KB
/
e-smith-base-5.2.0-relocate_dhcpd_leases_file.patch
File metadata and controls
35 lines (31 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
diff -Nur -x '*.orig' -x '*.rej' e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/console/configure.pm mezzanine_patched_e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/console/configure.pm
--- e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/console/configure.pm 2010-10-12 19:29:24.000000000 +0200
+++ mezzanine_patched_e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/console/configure.pm 2010-10-12 19:27:59.000000000 +0200
@@ -1690,7 +1690,7 @@
unless ((($start & $netmask) == $localnet) &&
(($end & $netmask) == $localnet))
{
- my $dhcpLeases = "/var/lib/dhcp/dhcpd.leases";
+ my $dhcpLeases = "/var/lib/dhcpd/dhcpd.leases";
open (WR, ">$dhcpLeases")
or die gettext("Can't open output file"),
" $dhcpLeases", ": $!\n";
diff -Nur -x '*.orig' -x '*.rej' e-smith-base-5.2.0/root/var/service/dhcpd/run mezzanine_patched_e-smith-base-5.2.0/root/var/service/dhcpd/run
--- e-smith-base-5.2.0/root/var/service/dhcpd/run 2005-11-21 05:28:11.000000000 +0100
+++ mezzanine_patched_e-smith-base-5.2.0/root/var/service/dhcpd/run 2010-10-12 19:26:51.000000000 +0200
@@ -23,12 +23,18 @@
interface=$(/sbin/e-smith/db configuration getprop InternalInterface Name)
configfile=/etc/dhcpd.conf
-leasefile=/var/lib/dhcp/dhcpd.leases
+leasefile=/var/lib/dhcpd/dhcpd.leases
/bin/touch $leasefile
/sbin/e-smith/expand-template $configfile
+# Relocate the leases file to its new location
+if [ -e /var/lib/dhcp/dhcpd.leases -a ! -z /var/lib/dhcpd/dhcpd.leases ]; then
+ mv -f /var/lib/dhcp/dhcpd.leases \
+ /var/lib/dhcpd/dhcpd.leases
+fi
+
exec /usr/sbin/dhcpd -d -f \
-cf $configfile \
-lf $leasefile \