frr: Set configuration file permissions correctly

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2018-10-30 17:32:48 +00:00
parent ebd6fe2b50
commit e1def10e29

View File

@@ -13,8 +13,17 @@ DAEMONS="zebra bgpd ospfd staticd"
case "${1}" in
start)
# Fix permissions of configuration directory
if [ -d "/etc/frr" ]; then
chown root.frr /etc/frr
chmod 775 /etc/frr
fi
for daemon in ${DAEMONS}; do
if [ -f "/etc/frr/${daemon}.conf" ]; then
# Set permissions
chown frr.frr "/etc/frr/${daemon}.conf"
boot_mesg "Starting FRRouting ${daemon}..."
loadproc "/usr/sbin/${daemon}" --daemon
fi