From d3a3e6253b7a2a4e911ebe549846b0cd9a28399c Mon Sep 17 00:00:00 2001 From: Javier Garcia Date: Tue, 1 Dec 2020 12:28:39 +0100 Subject: [PATCH] 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 --- tools/frrcommon.sh.in | 3 +++ 1 file changed, 3 insertions(+) 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 () { -- 2.39.5