/[smeserver]/rpms/e-smith-tinydns/sme9/e-smith-tinydns-2.4.0_add_hostname_following_dhcpdleases_hostname.patch
ViewVC logotype

Diff of /rpms/e-smith-tinydns/sme9/e-smith-tinydns-2.4.0_add_hostname_following_dhcpdleases_hostname.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.3 by stephdl, Fri Jan 9 23:33:20 2015 UTC Revision 1.4 by stephdl, Mon Jan 12 20:59:17 2015 UTC
# Line 50  diff -Nur e-smith-tinydns-2.4.0/root/etc Line 50  diff -Nur e-smith-tinydns-2.4.0/root/etc
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
# Line 84  diff -Nur e-smith-tinydns-2.4.0/root/etc Line 84  diff -Nur e-smith-tinydns-2.4.0/root/etc
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;
# Line 113  diff -Nur e-smith-tinydns-2.4.0/root/etc Line 113  diff -Nur e-smith-tinydns-2.4.0/root/etc
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


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed