summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Garcia <rampxxxx@gmail.com>2020-12-01 12:28:39 +0100
committerJavier Garcia <rampxxxx@gmail.com>2020-12-01 12:37:51 +0100
commitd3a3e6253b7a2a4e911ebe549846b0cd9a28399c (patch)
tree4f942514f57dc72f005de62fe43bad625c09ff1a
parent6b1ca210865d58313070b3cbc0e54cbcac25259c (diff)
tools: Fix run folder permissions
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>
-rw-r--r--tools/frrcommon.sh.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/frrcommon.sh.in b/tools/frrcommon.sh.in
index 312ee88bf4..3dbc6a1b43 100644
--- a/tools/frrcommon.sh.in
+++ b/tools/frrcommon.sh.in
@@ -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 () {