diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-01-24 17:54:17 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-01-24 17:54:17 -0800 |
commit | 484806de2ad2ce204e840160e0714049e8e316cf (patch) | |
tree | e615ff2d4c56e48816ccd19592e956b4c44cce0a | |
parent | 72c4913ad51c64f73f49e6ec00764185b8c32740 (diff) | |
parent | 35977317f7dafb2ce7ce372e1c406f1aa042fff6 (diff) | |
download | vyatta-cfg-484806de2ad2ce204e840160e0714049e8e316cf.tar.gz vyatta-cfg-484806de2ad2ce204e840160e0714049e8e316cf.zip |
Merge branch 'glendale' of git.vyatta.com:/git/vyatta-cfg into glendale
-rw-r--r-- | Makefile.am | 2 | ||||
-rwxr-xr-x | etc/init.d/vyatta-ofr | 5 | ||||
-rw-r--r-- | scripts/vyatta-dhclient-hook | 19 | ||||
-rw-r--r-- | scripts/vyatta-interfaces.pl | 1 |
4 files changed, 23 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am index 7cde9aa..ef5aece 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,6 +4,7 @@ completiondir = /etc/bash_completion.d initddir = /etc/init.d defaultdir = /etc/default etc_shell_leveldir = $(sysconfdir)/shell/level +dhcphookdir = /etc/dhcp3/dhclient-exit-hooks.d AM_CFLAGS = -I src -Wall AM_YFLAGS = -d --name-prefix=yy_`basename $* .y`_ @@ -11,6 +12,7 @@ AM_LFLAGS = --prefix=yy_`basename $* .l`_ -olex.yy.c completion_DATA = etc/bash_completion.d/20vyatta-cfg initd_SCRIPTS = etc/init.d/vyatta-ofr +dhcphook_SCRIPTS = scripts/vyatta-dhclient-hook lib_LTLIBRARIES = src/libvyatta-cfg.la src_libvyatta_cfg_la_LDFLAGS = -version-info 1:0:0 diff --git a/etc/init.d/vyatta-ofr b/etc/init.d/vyatta-ofr index 2af4af5..32eb554 100755 --- a/etc/init.d/vyatta-ofr +++ b/etc/init.d/vyatta-ofr @@ -41,10 +41,7 @@ declare -x BOOTFILE=$vyatta_sysconfdir/config/config.boot declare -a subinit declare -a all_subinits=( rl-system - firewall - dhcpd - dhcrelay - lighttpd ) + firewall ) if [ $# -gt 0 ] ; then for s in $@ ; do diff --git a/scripts/vyatta-dhclient-hook b/scripts/vyatta-dhclient-hook new file mode 100644 index 0000000..cc3cb08 --- /dev/null +++ b/scripts/vyatta-dhclient-hook @@ -0,0 +1,19 @@ + +# To enable this script set the following variable to "yes" +RUN="yes" + +if [ "$RUN" = "yes" ]; then + LOG=/var/lib/dhcp3/dhclient_"$interface"_lease + echo `date` > $LOG + + for i in reason interface new_expiry new_dhcp_lease_time medium \ + alias_ip_address new_ip_address new_broadcast_address \ + new_subnet_mask new_domain_name new_network_number \ + new_domain_name_servers new_routers new_static_routes \ + new_dhcp_server_identifier new_dhcp_message_type \ + old_ip_address old_subnet_mask old_domain_name \ + old_domain_name_servers old_routers \ + old_static_routes; do + echo $i=\'${!i}\' >> $LOG + done +fi diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index dde54c7..1f13e20 100644 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -277,6 +277,7 @@ sub delete_eth_addrs { if ($addr eq "dhcp") { dhcp_release_addr($intf); update_dhcp_client(); + system("rm -f /var/lib/dhcp3/dhclient_$intf\_lease"); return; } my $version = is_ip_v4_or_v6($addr); |