diff options
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/init.d/vyatta-ofr | 19 |
1 files changed, 14 insertions, 5 deletions
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 } |