diff options
-rwxr-xr-x | scripts/vyatta-image-tools.pl | 8 | ||||
-rw-r--r-- | templates/copy/file/node.tag/node.def | 1 |
2 files changed, 8 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 { diff --git a/templates/copy/file/node.tag/node.def b/templates/copy/file/node.tag/node.def index c52dccd..b19b788 100644 --- a/templates/copy/file/node.tag/node.def +++ b/templates/copy/file/node.tag/node.def @@ -1,6 +1,7 @@ help: Copy files from specified source scp://<user>:<passwd>@<host>/<file> ftp://<user>:<passwd>@<host>/<file> + http://<user>:<passwd>@<host>/<file> tftp://<host>/<file> comptype: imagefiles allowed: echo -n "<imagefiles>" |