diff options
author | John Estabrook <jestabro@vyos.io> | 2020-12-30 11:09:40 -0600 |
---|---|---|
committer | Daniil Baturin <daniil@vyos.io> | 2021-01-04 19:42:47 +0200 |
commit | 25a25e45e40d4c8452ccdda8d36f969a0f601d1e (patch) | |
tree | fd2c176eda3ceb4580c0b15ef3e8577b1ee4ee1e /scripts/vyatta-boot-config-loader | |
parent | 2bf719041fd6646cc1f107f2a8bb641240112b27 (diff) | |
download | vyatta-cfg-25a25e45e40d4c8452ccdda8d36f969a0f601d1e.tar.gz vyatta-cfg-25a25e45e40d4c8452ccdda8d36f969a0f601d1e.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 $? |