diff options
author | Viacheslav <v.gletenko@vyos.io> | 2021-12-11 10:42:57 +0000 |
---|---|---|
committer | Viacheslav <v.gletenko@vyos.io> | 2021-12-11 10:42:57 +0000 |
commit | 6d6aebef8225ec01a2e168355ae3bd81d07541ca (patch) | |
tree | 7cca6dddb93e97eb1a445df34259f7d752a4c1c1 | |
parent | 7ebf5824def200dcbac8ebb3851fa59df405b6c0 (diff) | |
download | vyatta-config-mgmt-6d6aebef8225ec01a2e168355ae3bd81d07541ca.tar.gz vyatta-config-mgmt-6d6aebef8225ec01a2e168355ae3bd81d07541ca.zip |
remote: T4029: Fix source address args for upload
-rwxr-xr-x | scripts/vyatta-commit-push.pl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/vyatta-commit-push.pl b/scripts/vyatta-commit-push.pl index 075fefa..d5637ca 100755 --- a/scripts/vyatta-commit-push.pl +++ b/scripts/vyatta-commit-push.pl @@ -97,7 +97,12 @@ foreach my $uri (@uris) { $remote .= "$path" if defined $path; print " $remote "; - system("python3 -c 'from vyos.remote import upload; upload(\"$tmp_push_file\", \"$uri/$save_file\", source_host=$source_address)'"); + # Don't set var 'source_host' if 'source-address' not in configuration + if ($source_address eq "None") { + system("python3 -c 'from vyos.remote import upload; upload(\"$tmp_push_file\", \"$uri/$save_file\")'"); + } else { + system("python3 -c 'from vyos.remote import upload; upload(\"$tmp_push_file\", \"$uri/$save_file\", source_host=$source_address)'"); + } } move($tmp_push_file, $last_push_file); |