diff options
-rw-r--r-- | debian/vyatta-cfg.postinst.in | 7 | ||||
-rwxr-xr-x | etc/init.d/vyatta-ofr | 19 |
2 files changed, 14 insertions, 12 deletions
diff --git a/debian/vyatta-cfg.postinst.in b/debian/vyatta-cfg.postinst.in index 621d783..938c8f7 100644 --- a/debian/vyatta-cfg.postinst.in +++ b/debian/vyatta-cfg.postinst.in @@ -3,13 +3,6 @@ prefix=@prefix@ sysconfdir=@sysconfdir@ -# make sure config dir and config file dir are usable -for d in {$prefix,$sysconfdir}/config; do - mkdir -p $d - chgrp -R quaggavty $d - chmod -R g+w $d -done - update-rc.d vyatta-ofr defaults 99 >/dev/null # do we want to start vyatta-ofr here in postinst? 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 } |