diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2009-07-15 16:37:19 -0700 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2009-07-15 16:37:19 -0700 |
commit | 920a62418d0138b7aa72c7a8799552af0a36771e (patch) | |
tree | c0a44bb118b9f1c350b1da2f09c994195d69eebd | |
parent | 5173daea9a18d45bfb062a03e0aec302e5d43c5f (diff) | |
download | vyatta-cfg-920a62418d0138b7aa72c7a8799552af0a36771e.tar.gz vyatta-cfg-920a62418d0138b7aa72c7a8799552af0a36771e.zip |
make it work with dhcp 4.1.0
-rw-r--r-- | scripts/vyatta-interfaces.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index e890f9c..99b0dd9 100644 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -280,7 +280,8 @@ sub run_dhclient { my ($intf_config_file, $intf_process_id_file, $intf_leases_file) = generate_dhclient_intf_files($intf); dhcp_update_config($intf_config_file, $intf); - my $cmd = "$dhcp_daemon -q -nw -cf $intf_config_file -pf $intf_process_id_file -lf $intf_leases_file $intf 2> /dev/null &"; + my $cmd = "$dhcp_daemon -pf $intf_process_id_file -x $intf 2> /dev/null; rm -f $intf_process_id_file 2> /dev/null;"; + $cmd .= "$dhcp_daemon -q -nw -cf $intf_config_file -pf $intf_process_id_file -lf $intf_leases_file $intf 2> /dev/null &"; # adding & at the end to make the process into a daemon immediately system ($cmd); } @@ -289,7 +290,8 @@ sub stop_dhclient { my $intf = shift; my ($intf_config_file, $intf_process_id_file, $intf_leases_file) = generate_dhclient_intf_files($intf); - my $release_cmd = "$dhcp_daemon -q -cf $intf_config_file -pf $intf_process_id_file -lf $intf_leases_file -r $intf 2> /dev/null"; + my $release_cmd = "$dhcp_daemon -q -cf $intf_config_file -pf $intf_process_id_file -lf $intf_leases_file -r $intf 2> /dev/null;"; + $release_cmd .= "rm -f $intf_process_id_file 2> /dev/null"; system ($release_cmd); system ("rm -f $intf_config_file"); } |