From 80e7697d11308f26dd916bb43b3e062b7dce0aca Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Tue, 6 Nov 2007 15:24:03 -0800 Subject: handle config directory in vyatta-ofr init. --- etc/init.d/vyatta-ofr | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'etc') diff --git a/etc/init.d/vyatta-ofr b/etc/init.d/vyatta-ofr index 92b8f3b..669c746 100755 --- a/etc/init.d/vyatta-ofr +++ b/etc/init.d/vyatta-ofr @@ -154,17 +154,25 @@ load_bootfile () fi } -setup_config_dir () +# this handles the "config dir" (/opt/vyatta/config), which is different +# from the directory for config files (/opt/vyatta/etc/config). +mount_cfg_dir () { - [ -d ${vyatta_configdir} ] || mkdir -p ${vyatta_configdir} - chgrp ${GROUP} ${vyatta_configdir} - chmod 0775 ${vyatta_configdir} + [ -d ${vyatta_configdir} ] || mkdir -p ${vyatta_configdir} + mount -o nosuid,nodev -t tmpfs none ${vyatta_configdir} + chgrp ${GROUP} ${vyatta_configdir} + chmod 0775 ${vyatta_configdir} +} + +unmount_cfg_dir () +{ + umount ${vyatta_configdir} } start () { log_daemon_msg "Starting Vyatta Router" - setup_config_dir + mount_cfg_dir if ! get_config; then try_floppy fi @@ -189,6 +197,7 @@ stop() ${vyatta_sbindir}/${s}.init stop let status\|=$? done + unmount_cfg_dir log_end_msg $status } -- cgit v1.2.3