]>
git.proxmox.com Git - mirror_frr.git/blob - debian/frr.preinst
3 if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE
=1; fi
4 ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*"}
8 # creating frrvty group if it isn't already there
9 if ! getent group frrvty
>/dev
/null
; then
10 addgroup
--system frrvty
>/dev
/null
13 # creating frr group if it isn't already there
14 if ! getent group frr
>/dev
/null
; then
15 addgroup
--system frr
>/dev
/null
18 # creating frr user if he isn't already there
19 if ! getent passwd frr
>/dev
/null
; then
23 --home /var
/run
/frr
/ \
24 --gecos "Frr routing suite" \
29 # We may be installing over an older version of
30 # frr and as such we need to intelligently
31 # check to see if the frr user is in the frrvty
33 if ! /usr
/bin
/id frr |
grep &>/dev
/null
'frrvty'; then
34 usermod
-a -G frrvty frr
>/dev
/null
37 # Do not change permissions when upgrading as it would violate policy.
38 if [ "$1" = "install" ]; then
39 # Logfiles are group readable in case users were put into the frr group.
44 find $d -type f
-print0 |
xargs -0 --no-run-if-empty chmod u
=rw
,g
=r
,o
=
46 # Strict permissions for the sockets.
51 find $d -type f
-print0 |
xargs -0 --no-run-if-empty chmod u
=rw
,go
=
53 # Config files. Vtysh does not have access to the individual daemons config file
58 find $d -type f
-print0 |
xargs -0 --no-run-if-empty chown frr
:frr
59 find $d -type f
-print0 |
xargs -0 --no-run-if-empty chmod u
=rw
,g
=r
,o
=
61 # Exceptions for vtysh.
68 # Exceptions for vtysh.
70 if [ -f $d/Zebra.conf
]; then