In invirt-dev:
authorEvan Broder <broder@mit.edu>
Sun, 22 Nov 2009 22:58:22 +0000 (17:58 -0500)
committerEvan Broder <broder@mit.edu>
Sun, 22 Nov 2009 22:58:22 +0000 (17:58 -0500)
  * Since the prerm code to remove the repo group from sudoers runs on
    upgrades, make sure the postinst code to add it back runs on all
    upgrades, too.

svn path=/trunk/packages/invirt-dev/; revision=2556

debian/changelog
debian/invirt-dev.postinst

index 14af9f1..d38a625 100644 (file)
@@ -3,8 +3,11 @@ invirt-dev (0.1.0) unstable; urgency=low
   * Switch to using git instead of svn.
   * Generate the apt repository configuration using gen-files instead of
     rolling our own.
+  * Since the prerm code to remove the repo group from sudoers runs on
+    upgrades, make sure the postinst code to add it back runs on all
+    upgrades, too.
 
- -- Evan Broder <broder@mit.edu>  Sun, 22 Nov 2009 15:57:59 -0500
+ -- Evan Broder <broder@mit.edu>  Sun, 22 Nov 2009 17:57:21 -0500
 
 invirt-dev (0.0.14) unstable; urgency=low
 
index f75d229..b873ea2 100755 (executable)
@@ -5,23 +5,25 @@ set -e
 
 case "$1" in
     configure)
-        if [ -z "$2" ]; then
+       if ! getent passwd repository >/dev/null 2>&1; then
             adduser --system repository
+       fi
+       if ! getent group repo >/dev/null 2>&1; then
             addgroup --system repo
+       fi
             
-            cat >>/etc/sudoers <<EOF
+        cat >>/etc/sudoers <<EOF
 ### BEGIN invirt-dev
 %repo   ALL=(repository)        ALWAYS_SET_HOME,NOPASSWD: /usr/bin/reprepro
 ### END invirt-dev
 EOF
-            echo "-----"
-            echo "invirt-dev: run"
-            echo "  adduser --disabled-password \$user"
-            echo "  adduser \$user repo"
-            echo "  adduser \$user sbuild"
-            echo "to make individual users that will build packages."
-            echo "-----"
-        fi
+        echo "-----"
+        echo "invirt-dev: run"
+        echo "  adduser --disabled-password \$user"
+        echo "  adduser \$user repo"
+        echo "  adduser \$user sbuild"
+        echo "to make individual users that will build packages."
+        echo "-----"
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)