diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-12-06 16:30:19 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-12-06 16:39:18 -0800 |
commit | b50112984f75faf046dc332f525325bf68fc32af (patch) | |
tree | b2cbb530cd591620e394d5bac68b079282a44496 | |
parent | 03f76c0c226163b4be3e11341d3e04e13df6d2e6 (diff) | |
download | vyatta-cfg-quagga-b50112984f75faf046dc332f525325bf68fc32af.tar.gz vyatta-cfg-quagga-b50112984f75faf046dc332f525325bf68fc32af.zip |
Move touch() perl to Vyatta::File
Put function in common code.
-rw-r--r-- | debian/control | 2 | ||||
-rwxr-xr-x | scripts/vyatta-interfaces.pl | 12 |
2 files changed, 2 insertions, 12 deletions
diff --git a/debian/control b/debian/control index c15d1d0c..5e6bd405 100644 --- a/debian/control +++ b/debian/control @@ -15,7 +15,7 @@ Depends: acpid, procps (>= 1:3.2.7-3), coreutils (>= 5.97-5.3), libpam-radius-auth, - vyatta-cfg (>= 0.18.56), + vyatta-cfg (>= 0.18.58), libc6 (>= 2.7-6), libpam-runtime (>= 1.0.1-5), vyatta-bash | bash (>= 3.1), 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) = @_; |