diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-12-11 12:55:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-11 12:55:57 +0100 |
commit | 74abdfd4f0ee4def3625e0fae58d8dad1bb674bd (patch) | |
tree | 7cca6dddb93e97eb1a445df34259f7d752a4c1c1 | |
parent | 7ebf5824def200dcbac8ebb3851fa59df405b6c0 (diff) | |
parent | 6d6aebef8225ec01a2e168355ae3bd81d07541ca (diff) | |
download | vyatta-config-mgmt-74abdfd4f0ee4def3625e0fae58d8dad1bb674bd.tar.gz vyatta-config-mgmt-74abdfd4f0ee4def3625e0fae58d8dad1bb674bd.zip |
Merge pull request #7 from sever-sever/T4029
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); |