[csw-devel] SF.net SVN: gar:[5083] csw/mgar/pkg/cswclassutils/trunk
bonivart at users.sourceforge.net
bonivart at users.sourceforge.net
Thu May 28 14:39:59 CEST 2009
Revision: 5083
http://gar.svn.sourceforge.net/gar/?rev=5083&view=rev
Author: bonivart
Date: 2009-05-28 12:39:59 +0000 (Thu, 28 May 2009)
Log Message:
-----------
cswclassutils: add AUTOENABLE tweak to cswinitsmf (#3635)
Modified Paths:
--------------
csw/mgar/pkg/cswclassutils/trunk/Makefile
csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.csw.smf.sample
csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf
Modified: csw/mgar/pkg/cswclassutils/trunk/Makefile
===================================================================
--- csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-05-28 09:21:43 UTC (rev 5082)
+++ csw/mgar/pkg/cswclassutils/trunk/Makefile 2009-05-28 12:39:59 UTC (rev 5083)
@@ -1,5 +1,5 @@
GARNAME = cswclassutils
-GARVERSION = 1.11
+GARVERSION = 1.12
CATEGORIES = utils
DESCRIPTION = CSW class action utilities
Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.csw.smf.sample
===================================================================
--- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.csw.smf.sample 2009-05-28 09:21:43 UTC (rev 5082)
+++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.csw.smf.sample 2009-05-28 12:39:59 UTC (rev 5083)
@@ -8,6 +8,7 @@
# Written by Peter Bonivart
#
# 2008-04-22 First release
+# 2009-05-28 Add AUTOENABLE
#
# Usage
# -----
@@ -51,6 +52,9 @@
##RC_SLEV 3 # Run levels that should have a start script symlink
##FMRI network # FMRI path for service (S10+), the example would give
# an FMRI of "svc:/network/cswfoo:default"
+##AUTOENABLE no # Will not enable SMF service regardless of local csw.conf,
+# use when a package needs setup before being useful,
+# would otherwise leave service in maintainance mode
case "$1" in
start)
Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf
===================================================================
--- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-05-28 09:21:43 UTC (rev 5082)
+++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf 2009-05-28 12:39:59 UTC (rev 5083)
@@ -14,6 +14,9 @@
# 2009-04-22 Fix bug when starting packages with multiple services (Ihsan Dogan)
# 2009-04-24 Temporarily disabled the "persistent state" code until it can be used
# per service, not just per package
+# 2009-05-28 Enabled persistent state code again after receiving patch from Yann.
+# Support AUTOENABLE to force no start regardless of
+# local csw.conf (Bug ID 0003635)
DEBUG= # clear to disable debug, set to anything to enable
SVCDIR=/var/opt/csw/svc
@@ -203,7 +206,11 @@
echo $PKGINST is using Service Management Facility. The FMRI is svc:/$FMRI/$service:default
# Start service
- if [ "$daemon" = "yes" ]; then
+ AUTOENABLE="yes"
+ if [ "`grep '^#AUTOENABLE' $dest`" ]; then
+ AUTOENABLE=`grep '^#AUTOENABLE' $dest | awk '{print $2}' | tr -s '[:upper:]' '[:lower:]'`
+ fi
+ if [ "$daemon" = "yes" -a "$AUTOENABLE" != "no" -a "$AUTOENABLE" != "false"]; then
load_smf_service_state "$FMRI/$service"
if [ "$SMF_STATE" = "enabled" ]; then
echo Enabling svc:/$FMRI/$service ...
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