From b50112984f75faf046dc332f525325bf68fc32af Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 6 Dec 2010 16:30:19 -0800 Subject: Move touch() perl to Vyatta::File Put function in common code. --- scripts/vyatta-interfaces.pl | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'scripts') 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) = @_; -- cgit v1.2.3