]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tools: Fix run folder permissions
authorJavier Garcia <rampxxxx@gmail.com>
Tue, 1 Dec 2020 11:28:39 +0000 (12:28 +0100)
committerJavier Garcia <rampxxxx@gmail.com>
Tue, 1 Dec 2020 11:37:51 +0000 (12:37 +0100)
In the case of some linux distros the /var/run dir is mounted
with tmpfs so in every reboot it's removed.
Then the frrcommon.sh will recreate it without 'x' perm
So no pid file cannot be created in /var/run/frr

Signed-off-by: Javier Garcia <rampxxxx@gmail.com>
tools/frrcommon.sh.in

index 312ee88bf4571d537b50a9b41804546a70077630..3dbc6a1b43b9c7bd8472015b49a1de6ef760f944 100644 (file)
@@ -59,6 +59,9 @@ chownfrr() {
        [ -n "$FRR_USER" ] && chown "$FRR_USER" "$1"
        [ -n "$FRR_GROUP" ] && chgrp "$FRR_GROUP" "$1"
        [ -n "$FRR_CONFIG_MODE" ] && chmod "$FRR_CONFIG_MODE" "$1"
+       if [ -d "$1" ]; then
+               chmod u+x "$1"
+       fi
 }
 
 vtysh_b () {