summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohit Mehta <mohit.mehta@vyatta.com>2008-07-23 02:49:55 +0000
committerMohit Mehta <mohit.mehta@vyatta.com>2008-07-23 02:49:55 +0000
commit2d83fb22c6921b73d2fa2c0585706887b23cc21f (patch)
tree136b7cef869c1b129a010afebb2ce83940cfc4b9
parente3ce1a4cb7482a08641d6c89840ec0c797cac472 (diff)
downloadvyatta-cfg-2d83fb22c6921b73d2fa2c0585706887b23cc21f.tar.gz
vyatta-cfg-2d83fb22c6921b73d2fa2c0585706887b23cc21f.zip
fix bug 3524 dhcp client doesn't insert default route on system reboot
- copy fix from islavista to hollywood
-rw-r--r--scripts/vyatta-interfaces.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl
index 18fbf61..3794769 100644
--- a/scripts/vyatta-interfaces.pl
+++ b/scripts/vyatta-interfaces.pl
@@ -312,7 +312,7 @@ sub delete_eth_addrs {
if ($addr eq "dhcp") {
stop_dhclient($intf);
- system("rm -f /var/lib/dhcp3/dhclient_$intf\_lease; rm -f /var/lib/dhcp3/$intf\; rm -f /var/lib/dhcp3/release_$intf\;");
+ system("rm -f /var/lib/dhcp3/dhclient_$intf\_lease; rm -f /var/lib/dhcp3/$intf\; rm -f /var/run/vyatta/dhclient/dhclient_release_$intf\;");
exit 0;
}
my $version = is_ip_v4_or_v6($addr);
@@ -457,7 +457,8 @@ sub op_dhcp_command {
exit 1;
}
- my $release_file = $dhclient_dir . 'release_' . $intf;
+ my $tmp_dhclient_dir = '/var/run/vyatta/dhclient/';
+ my $release_file = $tmp_dhclient_dir . 'dhclient_release_' . $intf;
if ($op_command eq "dhcp-release") {
if (-e $release_file) {
print "IP address for $intf has already been released.\n";
@@ -465,6 +466,9 @@ sub op_dhcp_command {
} else {
print "Releasing DHCP lease on $intf ...\n";
stop_dhclient($intf);
+ if(! -d $tmp_dhclient_dir ){
+ system ("mkdir $tmp_dhclient_dir\;");
+ }
system ("touch $release_file\;");
exit 0;
}