summaryrefslogtreecommitdiff
path: root/etc/init.d
diff options
context:
space:
mode:
Diffstat (limited to 'etc/init.d')
-rwxr-xr-xetc/init.d/vyatta-ofr18
1 files changed, 18 insertions, 0 deletions
diff --git a/etc/init.d/vyatta-ofr b/etc/init.d/vyatta-ofr
index b3dcacd..5e5711a 100755
--- a/etc/init.d/vyatta-ofr
+++ b/etc/init.d/vyatta-ofr
@@ -137,10 +137,27 @@ load_bootfile ()
fi
}
+# this handles the "config dir" (/opt/vyatta/config), which is different
+# from the directory for config files (/opt/vyatta/etc/config).
+mount_cfg_dir ()
+{
+ if [ ! -d ${vyatta_configdir} ] ; then
+ mkdir -m 0775 -p ${vyatta_configdir}
+ chgrp ${GROUP} ${vyatta_configdir}
+ fi
+ mount -o nosuid,nodev -t tmpfs none ${vyatta_configdir}
+}
+
+unmount_cfg_dir ()
+{
+ umount ${vyatta_configdir}
+}
+
start ()
{
log_daemon_msg "Starting Vyatta Router"
setup_configdir
+ mount_cfg_dir
init_bootfile
migrate_bootfile
for s in ${subinit[@]} ; do
@@ -162,6 +179,7 @@ stop()
${vyatta_sbindir}/${s}.init stop
let status\|=$?
done
+ unmount_cfg_dir
log_end_msg $status
}