mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 02:53:55 +00:00
debianpkg: Fix maintainer-script-should-not-use-recursive-chown-or-chmod
New lintian version causes warning for recursive chown and chmod. This change avoids the the recursive operation by splitting it into to commands Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
This commit is contained in:
parent
54c310b803
commit
e681915e64
@ -12,7 +12,8 @@ frrvtygid=`egrep "^frrvty:" $GROUPFILE | awk -F ":" '{ print $3 }'`
|
||||
[ -n ${frrgid} ] || (echo "No gid for frr in ${GROUPFILE}" && /bin/false)
|
||||
[ -n ${frrVTYgid} ] || (echo "No gid for frrvty in ${GROUPFILE}" && /bin/false)
|
||||
|
||||
chown -R ${frruid}:${frrgid} /etc/frr
|
||||
chown ${frruid}:${frrgid} /etc/frr
|
||||
chown ${frruid}:${frrgid} /etc/frr/*
|
||||
touch /etc/frr/vtysh.conf
|
||||
chgrp ${frrvtygid} /etc/frr/vtysh*
|
||||
chmod 644 /etc/frr/*
|
||||
|
@ -39,14 +39,16 @@ if [ "$1" = "install" ]; then
|
||||
# Logfiles are group readable in case users were put into the frr group.
|
||||
d=/var/log/frr/
|
||||
mkdir -p $d
|
||||
chown -R frr:frr $d
|
||||
chown frr:frr $d
|
||||
chown --quiet frr:frr $d/* | true
|
||||
chmod u=rwx,go=rx $d
|
||||
find $d -type f -print0 | xargs -0 --no-run-if-empty chmod u=rw,g=r,o=
|
||||
|
||||
# Strict permissions for the sockets.
|
||||
d=/var/run/frr/
|
||||
mkdir -p $d
|
||||
chown -R frr:frr $d
|
||||
chown frr:frr $d
|
||||
chown --quiet frr:frr $d/* | true
|
||||
chmod u=rwx,go=rx $d
|
||||
find $d -type f -print0 | xargs -0 --no-run-if-empty chmod u=rw,go=
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user