summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-05-03 15:17:51 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-05-03 15:17:51 -0500
commit081f5f6c14ecde6fe689dac696a70eb40937a99d (patch)
treef517c368efb69e61531c96a02629b824c41a440e /scripts
parent64095a2983d8d31cf0702bf8c4553f71ef25ea4f (diff)
downloadvyatta-op-081f5f6c14ecde6fe689dac696a70eb40937a99d.tar.gz
vyatta-op-081f5f6c14ecde6fe689dac696a70eb40937a99d.zip
Add http as a url mode users can copy from
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-image-tools.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/vyatta-image-tools.pl b/scripts/vyatta-image-tools.pl
index 0e0f74a..3a9bf08 100755
--- a/scripts/vyatta-image-tools.pl
+++ b/scripts/vyatta-image-tools.pl
@@ -49,6 +49,9 @@ sub conv_file {
} elsif ( lc($topdir) eq 'tftp') {
$file = $filein;
$topdir = 'url';
+ } elsif ( lc($topdir) eq 'http') {
+ $file = $filein;
+ $topdir = 'url';
} elsif ( lc($topdir) eq 'ftp') {
$file = $filein;
$topdir = 'url';
@@ -105,6 +108,9 @@ sub url_copy {
if (-d $from){
print "Cannot upload an entire directory to url\n";
exit 1;
+ } elsif ($to =~ /http/){
+ print "Cannot upload to http url\n";
+ exit 1;
}
curl_to($from, $to);
} elsif ($f_topdir eq 'url') {
@@ -179,7 +185,7 @@ sub update {
sub rsync {
my ($from,$to) = @_;
- system("rsync -av --progress $from $to");
+ system("rsync -a --progress $from $to");
}
sub curl_to {