diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2009-04-27 11:23:25 -0700 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2009-04-27 11:23:25 -0700 |
commit | ad8e4618e5a517b22ef5180ad59b0c116e0aaaa1 (patch) | |
tree | 5df6f79c7d548663e271d8a59346760ff1ff1ef3 | |
parent | cf35ad57b07bfe03e4de9a2e79ca718f0a1c021f (diff) | |
download | vyatta-cfg-quagga-ad8e4618e5a517b22ef5180ad59b0c116e0aaaa1.tar.gz vyatta-cfg-quagga-ad8e4618e5a517b22ef5180ad59b0c116e0aaaa1.zip |
Using perl module for move() rather than system call.
-rw-r--r-- | scripts/vyatta-banner.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/vyatta-banner.pl b/scripts/vyatta-banner.pl index 5daeb482..e1cd70a1 100644 --- a/scripts/vyatta-banner.pl +++ b/scripts/vyatta-banner.pl @@ -32,6 +32,7 @@ use lib '/opt/vyatta/share/perl5/'; use Vyatta::Config; use Getopt::Long; +use File::Copy; use strict; use warnings; @@ -43,14 +44,14 @@ my $postlogin_file = '/etc/motd'; sub save_orig_file { my $file = shift; - system "mv $file $file.old" if ! -e "$file.old"; + move($file, "$file.old") if ! -e "$file.old"; return; } sub restore_orig_file { my $file = shift; - system "mv $file.old $file" if -e "$file.old"; + move("$file.old", $file)if -e "$file.old"; return; } |