From d814833b484634442161de7be4935d1bd3f991a7 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 14 Nov 2008 16:12:55 -0800 Subject: Use perl mkdir Don't need to call out to shell to create directory --- scripts/vyatta-interfaces.pl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index b60f0ba..06bc3bb 100644 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -472,10 +472,8 @@ 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\;"); - } - touch($release_file); + mkdir ($tmp_dhclient_dir) if (! -d $tmp_dhclient_dir ); + touch ($release_file); exit 0; } } elsif ($op_command eq "dhcp-renew") { -- cgit v1.2.3