summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/vyatta-cfg.postinst.in7
-rwxr-xr-xetc/init.d/vyatta-ofr18
2 files changed, 18 insertions, 7 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 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
}