From 54b6ae5b4fe5717743e2ec7c0b9f622b8c0b45f4 Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Sat, 21 Jun 2008 04:54:10 +0000 Subject: better handling of allowed values for 'release/renew dhcp interface <>' --- scripts/vyatta-interfaces.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index f1c6bbe..1511c12 100644 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -298,7 +298,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/$intf\_release;"); + system("rm -f /var/lib/dhcp3/dhclient_$intf\_lease; rm -f /var/lib/dhcp3/$intf\; rm -f /var/lib/dhcp3/release_$intf\;"); exit 0; } my $version = is_ip_v4_or_v6($addr); @@ -443,7 +443,7 @@ sub op_dhcp_command { exit 1; } - my $release_file = $dhclient_dir . $intf . '_release'; + my $release_file = $dhclient_dir . 'release_' . $intf; if ($op_command eq "dhcp-release") { if (-e $release_file) { print "IP address for $intf has already been released.\n"; -- cgit v1.2.3