summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/quagga.preinst9
1 files changed, 8 insertions, 1 deletions
diff --git a/debian/quagga.preinst b/debian/quagga.preinst
index 39448b2f6..1af0b5ba6 100644
--- a/debian/quagga.preinst
+++ b/debian/quagga.preinst
@@ -24,7 +24,14 @@ if ! getent passwd quagga >/dev/null; then
--gecos "Quagga routing suite" \
--shell /bin/false \
quagga >/dev/null
- usermod -a -G quaggavty quagga >/dev/null
+fi
+
+# We may be installing over an older version of
+# quagga and as such we need to intelligently
+# check to see if the quagga user is in the quaggavty
+# group.
+if ! /usr/bin/id quagga | grep &>/dev/null 'quaggavty'; then
+ usermod -a -G quaggavty quagga >/dev/null
fi
# Do not change permissions when upgrading as it would violate policy.