diff options
author | cuongdt1994 <63875204+cuongdt1994@users.noreply.github.com> | 2023-06-14 21:25:49 +0700 |
---|---|---|
committer | cuongdt1994 <63875204+cuongdt1994@users.noreply.github.com> | 2023-06-14 21:25:49 +0700 |
commit | 3d03a0b9c9e53976de377332fb334307c7e88f06 (patch) | |
tree | 2afc3f428bc129457494b9dc8e83fe20b8a489e7 | |
parent | 0c1f4c358298498468e162bb847edb3467642ce4 (diff) | |
download | vyatta-cfg-3d03a0b9c9e53976de377332fb334307c7e88f06.tar.gz vyatta-cfg-3d03a0b9c9e53976de377332fb334307c7e88f06.zip |
T5291: vyatta-cfg-cmd-wrapper missing ${vyos_libexec_dir} variable
In file: /opt/vyatta/sbin/vyatta-cfg-cmd-wrapper
Commit 9e74ad7 changed the vyos-load-config.py script directory prefix to use ${vyos_libexec_dir}. However, the ${vyos_libexec_dir} variable is not exported at the start of the wrapper script.
When executing the load command over an SSH session it tries to execute the vyos-load-config.py script from root, and not /usr/libexec/vyos where the script resides
$ /opt/scripts/vyos/reset-router-config.pl --debug
[--] Resetting VyOS router configuration...
[??] Connection vyos:vyos@10.35.22.1 established successfully
[??] Command : /opt/vyatta/sbin/vyatta-cfg-cmd-wrapper begin
[??] Command : /opt/vyatta/sbin/vyatta-cfg-cmd-wrapper load config.boot.sauron.master
/opt/vyatta/sbin/vyatta-cfg-cmd-wrapper: line 84: /vyos-load-config.py: No such file or directory
[??] Error running command: /opt/vyatta/sbin/vyatta-cfg-cmd-wrapper load config.boot.sauron.master
[??] child exited with code 127
[??] Command : /opt/vyatta/sbin/vyatta-cfg-cmd-wrapper commit
[??] Command : /opt/vyatta/sbin/vyatta-cfg-cmd-wrapper end
-rwxr-xr-x | scripts/vyatta-cfg-cmd-wrapper | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/vyatta-cfg-cmd-wrapper b/scripts/vyatta-cfg-cmd-wrapper index 896f7ed..3102690 100755 --- a/scripts/vyatta-cfg-cmd-wrapper +++ b/scripts/vyatta-cfg-cmd-wrapper @@ -25,6 +25,7 @@ # some env variables are needed export vyatta_sysconfdir=/opt/vyatta/etc export vyatta_sbindir=/opt/vyatta/sbin +export vyos_libexec_dir=/usr/libexec/vyos LOGFILE=/var/log/vyatta/vyatta-commit.log |