diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2010-11-20 14:18:02 -0800 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2010-11-20 14:18:02 -0800 |
commit | 6ece44025adc02f4a1144a5232c3edb0c20c66e0 (patch) | |
tree | 7b00a066f71f3933fbd0e1b72d131b59853ab08d | |
parent | e1d3d25fa3e3f2bda51d74cd73f390625b1d8d1c (diff) | |
download | vyatta-config-mgmt-6ece44025adc02f4a1144a5232c3edb0c20c66e0.tar.gz vyatta-config-mgmt-6ece44025adc02f4a1144a5232c3edb0c20c66e0.zip |
Revert usage of libwww-curl-perl since it doesn't support scp.
-rw-r--r-- | debian/control | 1 | ||||
-rwxr-xr-x | scripts/vyatta-commit-push.pl | 18 |
2 files changed, 6 insertions, 13 deletions
diff --git a/debian/control b/debian/control index 0a1364d..e1206ff 100644 --- a/debian/control +++ b/debian/control @@ -11,6 +11,5 @@ Depends: perl, vyatta-cfg (>= 0.15.33), vyatta-cfg-system, vyatta-op, - libwww-curl-perl, Description: Vyatta commands for config-mgmt Vyatta configuration/operational templates and scripts for the config management system. diff --git a/scripts/vyatta-commit-push.pl b/scripts/vyatta-commit-push.pl index 1105067..8b3e089 100755 --- a/scripts/vyatta-commit-push.pl +++ b/scripts/vyatta-commit-push.pl @@ -38,7 +38,6 @@ use POSIX; use File::Compare; use File::Copy; use URI; -use WWW::Curl::Easy; use Sys::Hostname; @@ -83,18 +82,13 @@ foreach my $uri (@uris) { $remote .= "$scheme://$host"; $remote .= "$path" if defined $path; print " $remote "; - open(my $FILE, '<', $tmp_push_file) or die "Error: read $!"; - my $curl = new WWW::Curl::Easy; - $curl->setopt(CURLOPT_NOPROGRESS, 1); - $curl->setopt(CURLOPT_URL, "$uri/$save_file"); - $curl->setopt(CURLOPT_UPLOAD, 1); - $curl->setopt(CURLOPT_INFILE, $FILE); - $curl->setopt(CURLOPT_VERBOSE, $debug); - my $retcode = $curl->perform; - if ($retcode == 0) { - print "Ok\n"; + my $cmd = "curl -s -T $tmp_push_file $uri/$save_file"; + print "cmd [$cmd]\n" if $debug; + my $rc = system($cmd); + if ($rc eq 0) { + print " OK\n"; } else { - print "Failed: " . $curl->strerror($retcode) . "\n"; + print " failed\n"; } } move($tmp_push_file, $last_push_file); |