diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-11-14 16:12:55 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-11-14 16:12:55 -0800 |
commit | d814833b484634442161de7be4935d1bd3f991a7 (patch) | |
tree | a7d540658638814b02fcea7a6d622a307aee9ee0 /scripts | |
parent | 160d05043a4b36d519b1e0aeff540c428dac38dd (diff) | |
download | vyatta-cfg-d814833b484634442161de7be4935d1bd3f991a7.tar.gz vyatta-cfg-d814833b484634442161de7be4935d1bd3f991a7.zip |
Use perl mkdir
Don't need to call out to shell to create directory
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/vyatta-interfaces.pl | 6 |
1 files changed, 2 insertions, 4 deletions
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") { |