]> git.proxmox.com Git - mirror_frr.git/blobdiff - debianpkg/frr.preinst
debian: move changelog out of the way
[mirror_frr.git] / debianpkg / frr.preinst
index 29162e3b56a92bab011cf527d0ed0d29a35280b7..1c141f37f9654450bd36dfee0de2019a4e84a32c 100644 (file)
@@ -20,7 +20,7 @@ if ! getent passwd frr >/dev/null; then
         adduser \
           --system \
           --ingroup frr \
-          --home /var/run/frr/ \
+          --home /nonexistent \
           --gecos "Frr routing suite" \
           --shell /bin/false \
           frr  >/dev/null
@@ -30,7 +30,7 @@ fi
 # frr and as such we need to intelligently
 # check to see if the frr user is in the frrvty
 # group.
-if ! /usr/bin/id frr | grep &>/dev/null 'frrvty'; then
+if ! id frr | grep &>/dev/null 'frrvty'; then
     usermod -a -G frrvty frr >/dev/null
 fi
 
@@ -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=