summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
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 {