50 |
+ # copy of dhcpd.leases file to /tmp because working directly on the original |
+ # copy of dhcpd.leases file to /tmp because working directly on the original |
51 |
+ # is not a good idea |
+ # is not a good idea |
52 |
+ use File::Copy; |
+ use File::Copy; |
53 |
+ copy('/var/lib/dhcpd/dhcpd.leases', '/tmp/dhcpd.leases') |
+ copy('/var/lib/dhcpd/dhcpd.leases', '/tmp/tmpdhcpd.leases') |
54 |
+ or die ("Error dhcp-dns Service : Can't copy the /var/lib/dhcpd/dhcpd.leases"); |
+ or die ("Error dhcp-dns Service : Can't copy the /var/lib/dhcpd/dhcpd.leases"); |
55 |
+ |
+ |
56 |
+ #Text::DHCPparse forked because it doesn't allow to retrieve the end of lease |
+ #Text::DHCPparse forked because it doesn't allow to retrieve the end of lease |
84 |
+} |
+} |
85 |
+ |
+ |
86 |
+ # now we parse the leases |
+ # now we parse the leases |
87 |
+ $return = leaseparse('/tmp/dhcpd.leases'); |
+ $return = leaseparse('/tmp/tmpdhcpd.leases'); |
88 |
+ |
+ |
89 |
+ # variable with local domain value (default is mycompamy.local) |
+ # variable with local domain value (default is mycompamy.local) |
90 |
+ my $localdomain = get_local_domainname; |
+ my $localdomain = get_local_domainname; |
113 |
+ } |
+ } |
114 |
+ } |
+ } |
115 |
+ # remove the temp file |
+ # remove the temp file |
116 |
+ system ("rm -f /tmp/dhcpd.leases") ==0 |
+ system ("rm -f /tmp/tmpdhcpd.leases") ==0 |
117 |
+ or die ("Error dhcp-dns Service : Can't rm the /tmp/dhcpd.leases"); |
+ or die ("Error dhcp-dns Service : Can't rm the /tmp/tmpdhcpd.leases"); |
118 |
+} |
+} |
119 |
diff -Nur e-smith-tinydns-2.4.0/root/var/service/dhcp-dns/dhcp-dns e-smith-tinydns-2.4.0.bz2388/root/var/service/dhcp-dns/dhcp-dns |
diff -Nur e-smith-tinydns-2.4.0/root/var/service/dhcp-dns/dhcp-dns e-smith-tinydns-2.4.0.bz2388/root/var/service/dhcp-dns/dhcp-dns |
120 |
--- e-smith-tinydns-2.4.0/root/var/service/dhcp-dns/dhcp-dns 1970-01-01 01:00:00.000000000 +0100 |
--- e-smith-tinydns-2.4.0/root/var/service/dhcp-dns/dhcp-dns 1970-01-01 01:00:00.000000000 +0100 |