SF.net SVN: gar:[24502] csw/mgar/pkg/openntpd/trunk

bonivart at users.sourceforge.net bonivart at users.sourceforge.net
Mon Dec 22 20:32:07 CET 2014


Revision: 24502
          http://sourceforge.net/p/gar/code/24502
Author:   bonivart
Date:     2014-12-22 19:32:06 +0000 (Mon, 22 Dec 2014)
Log Message:
-----------
openntpd/trunk: smf and more

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

Added Paths:
-----------
    csw/mgar/pkg/openntpd/trunk/files/cswopenntpd
    csw/mgar/pkg/openntpd/trunk/files/cswusergroup

Modified: csw/mgar/pkg/openntpd/trunk/Makefile
===================================================================
--- csw/mgar/pkg/openntpd/trunk/Makefile	2014-12-22 17:19:28 UTC (rev 24501)
+++ csw/mgar/pkg/openntpd/trunk/Makefile	2014-12-22 19:32:06 UTC (rev 24502)
@@ -19,9 +19,14 @@
 
 RUNTIME_DEP_PKGS_CSWopenntpd += CSWlibssl1-0-0
 
+INITSMF = /etc/opt/csw/init.d/cswopenntpd
+USERGROUP = /etc/opt/csw/pkg/CSWopenntpd/cswusergroup
+SAMPLECONF = /etc/opt/csw/ntpd.conf
+
 GARCOMPILER = GNU
 
-CONFIGURE_ARGS = $(DIRPATHS)
+CONFIGURE_ARGS += $(DIRPATHS)
+CONFIGURE_ARGS += --with-privsep-user=openntpd
 
 # There are no tests
 SKIPTEST = 1
@@ -31,3 +36,9 @@
 
 include gar/category.mk
 
+post-install:
+	@echo " ==> Post-install of $(NAME)"
+	@ginstall -m 755 -d $(DESTDIR)/etc/opt/csw/init.d
+	@ginstall -m 755 $(FILEDIR)/cswopenntpd $(DESTDIR)/etc/opt/csw/init.d/cswopenntpd
+	@ginstall -m 755 -d $(DESTDIR)/etc/opt/csw/pkg/CSWopenntpd
+	@ginstall -m 444 $(FILEDIR)/cswusergroup $(DESTDIR)/etc/opt/csw/pkg/CSWopenntpd/

Added: csw/mgar/pkg/openntpd/trunk/files/cswopenntpd
===================================================================
--- csw/mgar/pkg/openntpd/trunk/files/cswopenntpd	                        (rev 0)
+++ csw/mgar/pkg/openntpd/trunk/files/cswopenntpd	2014-12-22 19:32:06 UTC (rev 24502)
@@ -0,0 +1,36 @@
+#!/sbin/sh
+
+# rc-script for CSW OpenNTPD
+# Peter Bonivart, 2014-12-22
+
+ZONE= # used for initialization, do not change
+
+case "$1" in
+  start)
+    if [ -f /opt/csw/sbin/ntpd -a -f /etc/opt/csw/ntpd.conf ]; then
+      echo "Starting openntpd."
+      /opt/csw/sbin/ntpd &
+    fi
+    ;;
+  stop)
+    echo "Shutting down openntpd."
+    if [ -x /usr/bin/zonename ]; then
+      if [ "`/usr/bin/zonename`" = "global" ]; then
+        ZONE="-z global"
+      fi
+    fi
+    pkill $ZONE -x ntpd
+    ;;
+  reload|refresh)
+    echo "Reloading openntpd."
+    if [ -x /usr/bin/zonename ]; then
+      if [ "`/usr/bin/zonename`" = "global" ]; then
+        ZONE="-z global"
+      fi
+    fi
+    pkill -HUP $ZONE -x ntpd
+    ;;
+  *)
+    echo "Usage: $0 { start | stop | reload | refresh }"
+    ;;
+esac

Added: csw/mgar/pkg/openntpd/trunk/files/cswusergroup
===================================================================
--- csw/mgar/pkg/openntpd/trunk/files/cswusergroup	                        (rev 0)
+++ csw/mgar/pkg/openntpd/trunk/files/cswusergroup	2014-12-22 19:32:06 UTC (rev 24502)
@@ -0,0 +1 @@
+openntpd:openntpd:CSW OpenNTPD:/var/opt/csw/openntpd:/bin/false:::NP

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