[csw-devel] SF.net SVN: gar:[3593] csw/mgar/pkg/unbound/trunk

idogan23 at users.sourceforge.net idogan23 at users.sourceforge.net
Thu Mar 5 23:09:01 CET 2009


Revision: 3593
          http://gar.svn.sourceforge.net/gar/?rev=3593&view=rev
Author:   idogan23
Date:     2009-03-05 22:09:01 +0000 (Thu, 05 Mar 2009)

Log Message:
-----------
unbound: added preinstall script, changed pid file location

Modified Paths:
--------------
    csw/mgar/pkg/unbound/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/unbound/trunk/files/CSWunbound.preinstall

Modified: csw/mgar/pkg/unbound/trunk/Makefile
===================================================================
--- csw/mgar/pkg/unbound/trunk/Makefile	2009-03-05 21:02:00 UTC (rev 3592)
+++ csw/mgar/pkg/unbound/trunk/Makefile	2009-03-05 22:09:01 UTC (rev 3593)
@@ -11,7 +11,7 @@
 
 MASTER_SITES = http://unbound.net/downloads/
 DISTFILES  = $(GARNAME)-$(GARVERSION).tar.gz
-DISTFILES += $(call admfiles,CSWunbound,)
+DISTFILES += $(call admfiles,CSWunbound, preinstall)
 
 GARCOMPILER = GCC4
 
@@ -26,5 +26,6 @@
 CONFIGURE_ARGS += --without-pthreads
 CONFIGUTE_ARGS += --with-solaris-threads
 CONFIGURE_ARGS += --with-ssl=/opt/csw
+CONFIGURE_ARGS += --with-pidfile=/var/run/unbound.pid
 
 include gar/category.mk

Added: csw/mgar/pkg/unbound/trunk/files/CSWunbound.preinstall
===================================================================
--- csw/mgar/pkg/unbound/trunk/files/CSWunbound.preinstall	                        (rev 0)
+++ csw/mgar/pkg/unbound/trunk/files/CSWunbound.preinstall	2009-03-05 22:09:01 UTC (rev 3593)
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# check, if the unbound user does exist
+grep '^unbound:' $PKG_ROOT_DIR/etc/passwd >/dev/null
+if [ $? -ne 0 ] ; then
+        getent passwd unbound >/dev/null
+        if [ $? -ne 0 ] ; then
+                NEEDUSER=1
+        fi
+fi
+
+# create the unbound user, if NEEDUSER=1
+if [ "$NEEDUSER" = 1 ] ; then
+        echo Adding required unbound user
+
+        # create the amavis user
+        /usr/sbin/useradd -d /var/run -g other -c 'unbound pseud user' -s /bin/false unbound
+fi


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list