summaryrefslogtreecommitdiff
path: root/src/init
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2024-06-05 12:36:21 -0500
committerJohn Estabrook <jestabro@vyos.io>2024-06-05 19:20:02 -0500
commitc71f6cb19de3400462fde1b745221f9355c393c0 (patch)
treed0a70020dd0180132f58984ebfd218507cd48060 /src/init
parent77cb661d81da44ac89b3fe3a0bca0e255dc430b7 (diff)
downloadvyos-1x-c71f6cb19de3400462fde1b745221f9355c393c0.tar.gz
vyos-1x-c71f6cb19de3400462fde1b745221f9355c393c0.zip
migration: T6006: update config.boot.default and move to vyos-1x
Diffstat (limited to 'src/init')
-rwxr-xr-xsrc/init/vyos-router12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/init/vyos-router b/src/init/vyos-router
index 15e37df07..a88810f08 100755
--- a/src/init/vyos-router
+++ b/src/init/vyos-router
@@ -22,6 +22,7 @@ declare progname=${0##*/}
declare action=$1; shift
declare -x BOOTFILE=$vyatta_sysconfdir/config/config.boot
+declare -x DEFAULT_BOOTFILE=$vyatta_sysconfdir/config.boot.default
# If vyos-config= boot option is present, use that file instead
for x in $(cat /proc/cmdline); do
@@ -129,9 +130,16 @@ unmount_encrypted_config() {
# if necessary, provide initial config
init_bootfile () {
+ # define and version default boot config if not present
+ if [ ! -r $DEFAULT_BOOTFILE ]; then
+ if [ -f $vyos_data_dir/config.boot.default ]; then
+ cp $vyos_data_dir/config.boot.default $DEFAULT_BOOTFILE
+ $vyos_libexec_dir/system-versions-foot.py >> $DEFAULT_BOOTFILE
+ fi
+ fi
if [ ! -r $BOOTFILE ] ; then
- if [ -f $vyatta_sysconfdir/config.boot.default ]; then
- cp $vyatta_sysconfdir/config.boot.default $BOOTFILE
+ if [ -f $DEFAULT_BOOTFILE ]; then
+ cp $DEFAULT_BOOTFILE $BOOTFILE
else
$vyos_libexec_dir/system-versions-foot.py > $BOOTFILE
fi