summaryrefslogtreecommitdiff
path: root/scripts/vyatta-interfaces.pl
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-12-06 16:30:19 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-12-06 16:39:18 -0800
commitb50112984f75faf046dc332f525325bf68fc32af (patch)
treeb2cbb530cd591620e394d5bac68b079282a44496 /scripts/vyatta-interfaces.pl
parent03f76c0c226163b4be3e11341d3e04e13df6d2e6 (diff)
downloadvyatta-cfg-quagga-b50112984f75faf046dc332f525325bf68fc32af.tar.gz
vyatta-cfg-quagga-b50112984f75faf046dc332f525325bf68fc32af.zip
Move touch() perl to Vyatta::File
Put function in common code.
Diffstat (limited to 'scripts/vyatta-interfaces.pl')
-rwxr-xr-xscripts/vyatta-interfaces.pl12
1 files changed, 1 insertions, 11 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl
index 11b5c8c5..efefca9a 100755
--- a/scripts/vyatta-interfaces.pl
+++ b/scripts/vyatta-interfaces.pl
@@ -35,11 +35,11 @@ use Vyatta::Config;
use Vyatta::Misc qw(generate_dhclient_intf_files
getInterfaces getIP get_sysfs_value
is_address_enabled is_dhcp_enabled is_ip_v4_or_v6);
+use Vyatta::File qw(touch);
use Vyatta::Interface;
use Getopt::Long;
use POSIX;
-use Fcntl;
use strict;
use warnings;
@@ -117,16 +117,6 @@ sub is_up {
exit 1;
}
-sub touch {
- my $file = shift;
- my $t = time;
-
- sysopen (my $f, $file, O_RDWR|O_CREAT)
- or die "Can't touch $file: $!";
- close $f;
- utime $t, $t, $file;
-}
-
sub dhcp_write_file {
my ($file, $data) = @_;