diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-04-13 02:44:28 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-04-13 13:21:44 +0200 |
commit | fd8155c0467ca83e9c8916ed6d8adcfb3d4b968a (patch) | |
tree | 758c863a6ff7444da2b264f353b91f9d7978663c | |
parent | lib, zebra: Refactor vrf creation a bit more (diff) | |
download | frr-fd8155c0467ca83e9c8916ed6d8adcfb3d4b968a.tar.xz frr-fd8155c0467ca83e9c8916ed6d8adcfb3d4b968a.zip |
debian: Add the creation of the quagga user to quaggavty group
The creation of the quagga user was not the only place
to add the quagga user to the quaggavty group. If
we are reinstalling quagga over a old version of
code then we need to check to see if the quagga
user is in the quaggavty and do the right thing.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Dave Olson <olson@cumulusnetworks.com>
-rw-r--r-- | debian/quagga.preinst | 9 |
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. |