summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMohit Mehta <mohit.mehta@vyatta.com>2009-06-26 18:30:10 -0700
committerMohit Mehta <mohit.mehta@vyatta.com>2009-06-26 18:53:06 -0700
commitda5e2ca70184d0254ba5cd44818c6213cbcfac9a (patch)
tree8b2aa365351ba060b2ce3f7d2ebfa027ebf578cf /scripts
parentaa697721489c867de9b39121836c05a5bc3239b6 (diff)
downloadvyatta-cfg-da5e2ca70184d0254ba5cd44818c6213cbcfac9a.tar.gz
vyatta-cfg-da5e2ca70184d0254ba5cd44818c6213cbcfac9a.zip
make changes to work with dhcp 4.1.0
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-interfaces.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl
index 77de148..1388155 100755
--- a/scripts/vyatta-interfaces.pl
+++ b/scripts/vyatta-interfaces.pl
@@ -220,7 +220,8 @@ sub run_dhclient {
= generate_dhclient_intf_files($intf);
dhcp_update_config($intf_config_file, $intf);
if (!(is_intf_disabled($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) == 0
or warn "start $dhcp_daemon failed: $?\n";
@@ -232,7 +233,8 @@ sub stop_dhclient {
if (!(is_intf_disabled($intf))) {
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) == 0
or warn "stop $dhcp_daemon failed: $?\n";
}