diff options
author | John Estabrook <jestabro@vyos.io> | 2020-12-30 11:09:40 -0600 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2020-12-30 11:17:37 -0600 |
commit | 83d246d1e284fbf70f69969dbde2771fc4604f7c (patch) | |
tree | 52cfec552a2ceb74cc830ccea8b2f86e4cb0c574 /scripts/vyatta-boot-config-loader | |
parent | 80e24b9dcf24dd39be5a1916e3d638b4c01f3783 (diff) | |
download | vyatta-cfg-83d246d1e284fbf70f69969dbde2771fc4604f7c.tar.gz vyatta-cfg-83d246d1e284fbf70f69969dbde2771fc4604f7c.zip |
migration: T3161: remove ConfigLoad.pm, all dependents and references
Remove ConfigLoad.pm due to its legacy reference to XorpConfigParser,
all dependent scripts:
vyatta-boot-config-loader
vyatta-config-loader.pl
vyatta-load-config.pl
(rewritten or obviated), and references in logrotate, Makefile.am, and
vyos-router (vyatta-boot-config-loader was kept as a fallback when
initially introducing vyos-boot-config-loader.py).
Diffstat (limited to 'scripts/vyatta-boot-config-loader')
-rwxr-xr-x | scripts/vyatta-boot-config-loader | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/scripts/vyatta-boot-config-loader b/scripts/vyatta-boot-config-loader deleted file mode 100755 index b242b78..0000000 --- a/scripts/vyatta-boot-config-loader +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash - -BOOT_FILE=$1 -shift - -CAPI=/bin/cli-shell-api -CLOG=/var/log/vyatta/vyatta-config-loader.log -COMMIT=/opt/vyatta/sbin/my_commit -COMMIT_LOG=/var/log/vyatta/vyatta-commit.log - -do_log () { - local level=$1 - shift - logger -t 'boot-config-loader' -p "local0.$level" -- "$*" -} - -do_commit () { - # Check if debug is enabled in the kernel command line - grep vyos-debug /proc/cmdline > /dev/null - if [ $? == 0 ]; then - VYOS_DEBUG=$debug $COMMIT "$@" >>$COMMIT_LOG - else - $COMMIT "$@" >>$COMMIT_LOG - fi -} - -trace () { - echo "$(date +'%F %T') $*" -} - -umask 0002 - -( - trace '== begin boot-config-loader' - # set up config session - SID=$$ - SENV=$($CAPI getSessionEnv $SID) - eval "$SENV" - if ! $CAPI setupSession; then - do_log err 'Cannot set up configuration session.' - trace 'Cannot set up configuration session.' - exit 1 - fi - - # do load - trace '-- begin load' - if ! $CAPI loadFile $BOOT_FILE; then - do_log warn "Failure(s) encountered during load. See $CLOG for details." - trace '-- load finished with failure(s)' - else - trace '-- load finished successfully' - fi - - # do commit - trace '-- begin commit' - ret=0 - export COMMIT_VIA=boot-config-loader - if ! do_commit ; then - do_log err 'Commit failed at boot.' - trace '-- commit failed' - ret=1 - else - trace '-- commit succeeded' - fi - - # clean up - if ! $CAPI teardownSession; then - do_log warn 'Failed to tear down configuration session.' - trace '-- teardown failed' - else - trace '-- teardown succeeded' - fi - trace '-- exiting' - echo $ret > /tmp/vyos-config-status - sync - exit $ret -) </dev/null >>$CLOG 2>&1 - -exit $? |