[vdr] 01/01: Fixed use of getent in postinst script for detecting existing vdr user and group (Closes: #770773)

Tobias Grimm tiber-guest at moszumanska.debian.org
Sun Feb 8 17:32:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

tiber-guest pushed a commit to annotated tag debian/2.0.3-3
in repository vdr.

commit 6a1b4a7a3643cdcaa69d3cbbd79fd6ac39603c2f
Author: etobi <git at e-tobi.net>
Date:   Mon Dec 8 00:25:36 2014 +0100

    Fixed use of getent in postinst script for detecting existing vdr user and group (Closes: #770773)
---
 debian/changelog    | 7 +++++++
 debian/vdr.postinst | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index bf3ac91..1c2e79e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+vdr (2.0.3-3) testing; urgency=medium
+
+  * Fixed use of getent in postinst script for detecting existing vdr user and
+    group (Closes: #770773)
+
+ -- Tobias Grimm <etobi at debian.org>  Mon, 08 Dec 2014 00:20:19 +0100
+
 vdr (2.0.3-2) unstable; urgency=medium
 
   * Fix "unhandled symlink to directory conversion of vdr-dbg (Closes: #736297)
diff --git a/debian/vdr.postinst b/debian/vdr.postinst
index 761433a..1746358 100644
--- a/debian/vdr.postinst
+++ b/debian/vdr.postinst
@@ -75,12 +75,12 @@ case "$1" in
         # ensure that user and group 'vdr' exist
         USER=vdr
         GROUP=vdr
-        if ! getent group | grep -q "^$GROUP:" ; then
+        if ! getent group "$GROUP"| grep -q "^$GROUP:" ; then
                 echo -n "Adding group $GROUP.."
                 addgroup --quiet --system $GROUP
                 echo "..done"
         fi
-        if ! getent passwd | grep -q "^$USER:"; then
+        if ! getent passwd "$USER"| grep -q "^$USER:"; then
                 echo -n "Adding user $USER.."
                 adduser --system --home /var/lib/vdr --shell /bin/false \
                         --gecos "VDR user" --no-create-home \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vdr-dvb/vdr.git



More information about the pkg-vdr-dvb-changes mailing list