[Osaas-commits] r60 - in trunk: . packaging/debian

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Sep 18 13:14:41 CEST 2009


Author: sholl
Date: 2009-09-18 13:14:41 +0200 (Fri, 18 Sep 2009)
New Revision: 60

Modified:
   trunk/ChangeLog
   trunk/packaging/debian/preinst
Log:
	* packaging/debian/preinst: added test which avoids creating
	  osaas-user twice when updating the package. (This change was
          accidentily not yet commited).



Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-03-15 12:04:43 UTC (rev 59)
+++ trunk/ChangeLog	2009-09-18 11:14:41 UTC (rev 60)
@@ -1,3 +1,8 @@
+2009-04-06  Stephan Holl  <stephan.holl at intevation.de>
+
+	* packaging/debian/preinst: added test which avoids creating
+	  osaas-user twice when updating the package.
+
 2009-03-15  Stephan Holl  <stephan.holl at intevation.de>
 
 	* packaging/debian/changelog: updated revision-number

Modified: trunk/packaging/debian/preinst
===================================================================
--- trunk/packaging/debian/preinst	2009-03-15 12:04:43 UTC (rev 59)
+++ trunk/packaging/debian/preinst	2009-09-18 11:14:41 UTC (rev 60)
@@ -16,14 +16,16 @@
 
 case "$1" in
     install)
-    # create users
-    groupadd -r osaas >/dev/null 2>&1 || :
-    useradd -g osaas -r -d /opt/gispatcher/osaas-server -s /bin/bash -c "OSAAS-Server " osaas >/dev/null 2>&1 || :
-    install -d /var/log/osaas
-    install -d /opt/gispatcher/osaas-server
-    chown osaas:osaas /var/log/osaas
-    chown -R osaas:osaas /opt/gispatcher/osaas-server
-    chmod 0700 /var/log/osaas
+    if ! getent passwd osaas ; then
+        # create users if not present yet
+        groupadd -r osaas >/dev/null 2>&1 || :
+        useradd -g osaas -r -d /opt/gispatcher/osaas-server -s /bin/bash -c "OSAAS-Server " osaas >/dev/null 2>&1 || :
+        install -d /var/log/osaas
+        install -d /opt/gispatcher/osaas-server
+        chown osaas:osaas /var/log/osaas
+        chown -R osaas:osaas /opt/gispatcher/osaas-server
+        chmod 0700 /var/log/osaas
+    fi
     ;;
 
     upgrade)



More information about the Osaas-commits mailing list