]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
frr: Set configuration file permissions correctly
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 30 Oct 2018 17:32:48 +0000 (17:32 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 30 Oct 2018 17:32:48 +0000 (17:32 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/packages/frr

index 9ebb5f85b4161ca2c2d7ed238fbf7c74c985e7be..5fa4e9fa8f5e6f16efb1b80a4e0a50a2de995e2a 100755 (executable)
@@ -13,8 +13,17 @@ DAEMONS="zebra bgpd ospfd staticd"
 
 case "${1}" in
        start)
 
 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
                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
                                boot_mesg "Starting FRRouting ${daemon}..."
                                loadproc "/usr/sbin/${daemon}" --daemon
                        fi