summaryrefslogtreecommitdiff
path: root/etc/init.d
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2007-10-24 09:09:29 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2007-10-24 09:09:29 -0700
commitae08adfabeed8fec9093e759a40f156d589defa9 (patch)
tree346ae29a6645f5b547b567b4a9956a6338462f89 /etc/init.d
parentf3a563927fd763646b104e9af0a8a78f48920a95 (diff)
downloadvyatta-cfg-ae08adfabeed8fec9093e759a40f156d589defa9.tar.gz
vyatta-cfg-ae08adfabeed8fec9093e759a40f156d589defa9.zip
make sure config directories have correct permissions.
Diffstat (limited to 'etc/init.d')
-rwxr-xr-xetc/init.d/vyatta-ofr10
1 files changed, 9 insertions, 1 deletions
diff --git a/etc/init.d/vyatta-ofr b/etc/init.d/vyatta-ofr
index f0d9695..0c71b20 100755
--- a/etc/init.d/vyatta-ofr
+++ b/etc/init.d/vyatta-ofr
@@ -150,13 +150,21 @@ load_bootfile ()
{
if [ -x $vyatta_sbindir/vyatta-config-loader.pl ]; then
log_progress_msg configure
- $vyatta_sbindir/vyatta-config-loader.pl $BOOTFILE
+ sg ${GROUP} -c "$vyatta_sbindir/vyatta-config-loader.pl $BOOTFILE"
fi
}
+setup_config_dir ()
+{
+ [ -d ${vyatta_configdir} ] || mkdir -p ${vyatta_configdir}
+ chgrp ${GROUP} ${vyatta_configdir}
+ chmod 0775 ${vyatta_configdir}
+}
+
start ()
{
log_daemon_msg "Starting Vyatta Router"
+ setup_config_dir
if ! get_config; then
try_floppy
fi