summaryrefslogtreecommitdiff
path: root/etc/init.d
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2007-11-06 15:24:03 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2007-11-06 15:24:03 -0800
commit80e7697d11308f26dd916bb43b3e062b7dce0aca (patch)
tree759bbfa87ee2de560ad921da5d332822f556e43a /etc/init.d
parentdd44aa3fb6baf361cb59a5cd5c4dd3f77080d82b (diff)
downloadvyatta-cfg-80e7697d11308f26dd916bb43b3e062b7dce0aca.tar.gz
vyatta-cfg-80e7697d11308f26dd916bb43b3e062b7dce0aca.zip
handle config directory in vyatta-ofr init.
Diffstat (limited to 'etc/init.d')
-rwxr-xr-xetc/init.d/vyatta-ofr19
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
}