summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-24 11:50:40 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-24 11:50:40 -0800
commitde8413744cbfebce8d737685e38b7835138c6428 (patch)
tree0a0e572e481e687d49f834ae3133b6eebd4a83ea
parentc12b9ae4ef02f54233e9d390d08591e761d84d04 (diff)
parent85b1df2edc7c47fc6cac61f5f5cc0150d102bda9 (diff)
downloadvyatta-cfg-de8413744cbfebce8d737685e38b7835138c6428.tar.gz
vyatta-cfg-de8413744cbfebce8d737685e38b7835138c6428.zip
Merge branch 'mendocino' of suva.vyatta.com:/git/vyatta-cfg into mendocino
-rw-r--r--debian/changelog6
-rwxr-xr-xetc/init.d/vyatta-router22
2 files changed, 28 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index c1e6cff..5f383a8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+vyatta-cfg (0.18.40) unstable; urgency=low
+
+ * Bind mount /opt/vyatta/etc/config to /config.
+
+ -- Bob Gilligan <gilligan@vyatta.com> Wed, 24 Nov 2010 10:44:14 -0800
+
vyatta-cfg (0.18.39) unstable; urgency=low
* Add COMMIT_VIA environment variable.
diff --git a/etc/init.d/vyatta-router b/etc/init.d/vyatta-router
index 4f10f3a..763471a 100755
--- a/etc/init.d/vyatta-router
+++ b/etc/init.d/vyatta-router
@@ -180,6 +180,26 @@ bind_mount_boot()
fi
}
+#
+# On live booted machines (i.e. systems booted from LiveCD and systems
+# booted from images), the /opt/vyatta/etc/config directory is bind
+# mounted to /config. We want all machines to have the config directory
+# mounted under /config because it is a more convenient location. So we
+# bind mount /opt/vyatta/etc/config to /config here if it has not already
+# been done.
+#
+mount_slash_config ()
+{
+ mounted=`mount | grep /opt/vyatta/etc/config`
+
+ if [ -z "$mounted" ]; then
+ if [ ! -d /config ]; then
+ mkdir /config
+ fi
+ mount --bind /opt/vyatta/etc/config /config
+ fi
+}
+
start ()
{
log_action_begin_msg "Mounting Vyatta Config"
@@ -189,6 +209,8 @@ start ()
disabled bootfile || init_bootfile
+ mount_slash_config
+
log_daemon_msg "Starting Vyatta router"
disabled migrate || migrate_bootfile
for s in ${subinit[@]} ; do