summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-09-16 15:33:47 -0500
committerJohn Estabrook <jestabro@vyos.io>2025-09-19 12:09:52 -0500
commit0f2b084b32a93741259ec4a02f966d27ee2a25cb (patch)
tree52d24e057701871b5852a35ea0f0d14b7a828bf9
parent1824f304c969be04c7dcb0d8868576839316c2dc (diff)
downloadvyos-1x-0f2b084b32a93741259ec4a02f966d27ee2a25cb.tar.gz
vyos-1x-0f2b084b32a93741259ec4a02f966d27ee2a25cb.zip
T7836: move bind mount of /config to vyos-1x
We are removing the bind mount construction from the initrd components in live-boot, as: (1) it is not needed before initialization in the vyos-router script (2) does not correctly update inodes on libc rename (3) fails on the livecd (cf. /var/log/live/boot.log)
-rwxr-xr-xsrc/init/vyos-router13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/init/vyos-router b/src/init/vyos-router
index 7a02ce564..e6e1f3b9b 100755
--- a/src/init/vyos-router
+++ b/src/init/vyos-router
@@ -314,6 +314,17 @@ bind_mount_boot ()
fi
}
+bind_mount_slash_config ()
+{
+ if [ -d /opt/vyatta/etc/config ]
+ then
+ if [ ! -d /config ] ; then
+ mkdir /config
+ fi
+ mount --bind /opt/vyatta/etc/config /config
+ fi
+}
+
clear_or_override_config_files ()
{
for conf in snmp/snmpd.conf snmp/snmptrapd.conf snmp/snmp.conf \
@@ -587,6 +598,8 @@ start ()
bind_mount_boot
+ disabled bind_mount_slash_config || bind_mount_slash_config
+
disabled configure || load_bootfile || overall_status=1
log_end_msg $?