[csw-devel] SF.net SVN: gar:[2756] csw/mgar/pkg/cswclassutils/trunk

bonivart at users.sourceforge.net bonivart at users.sourceforge.net
Wed Jan 7 17:32:19 CET 2009


Revision: 2756
          http://gar.svn.sourceforge.net/gar/?rev=2756&view=rev
Author:   bonivart
Date:     2009-01-07 16:32:18 +0000 (Wed, 07 Jan 2009)

Log Message:
-----------
cswclassutils: fixed bug in initsmf

Modified Paths:
--------------
    csw/mgar/pkg/cswclassutils/trunk/Makefile
    csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf

Modified: csw/mgar/pkg/cswclassutils/trunk/Makefile
===================================================================
--- csw/mgar/pkg/cswclassutils/trunk/Makefile	2009-01-07 14:29:09 UTC (rev 2755)
+++ csw/mgar/pkg/cswclassutils/trunk/Makefile	2009-01-07 16:32:18 UTC (rev 2756)
@@ -1,5 +1,5 @@
 GARNAME = cswclassutils
-GARVERSION = 1.1
+GARVERSION = 1.2
 CATEGORIES = utils
 
 DESCRIPTION = CSW class action utilities
@@ -21,13 +21,13 @@
 	@echo " ==> Installing $(GARNAME)"
 	@rm -rf $(DESTDIR)
 	@ginstall -d $(DESTDIR)/etc/opt/csw/init.d
-	@ginstall -d $(DESTDIR)/opt/csw/share/doc/$(GARNAME)
+	@ginstall -d $(DESTDIR)$(docdir)/$(GARNAME)
 	@ginstall -d $(DESTDIR)/usr/sadm/install/scripts
 	@ginstall -d $(DESTDIR)/var/opt/csw/svc/manifest
 	@ginstall -d $(DESTDIR)/var/opt/csw/svc/method
 	@cp $(FILEDIR)/CSW$(GARNAME).csw.smf.sample $(DESTDIR)/etc/opt/csw/init.d/csw.smf.sample
-	@cp $(FILEDIR)/CSW$(GARNAME).README.CSW $(DESTDIR)/opt/csw/share/doc/$(GARNAME)/README.CSW
-	@cp $(FILEDIR)/CSW$(GARNAME).copyright $(DESTDIR)/opt/csw/share/doc/$(GARNAME)/LICENSE
+	@cp $(FILEDIR)/CSW$(GARNAME).README.CSW $(DESTDIR)$(docdir)/$(GARNAME)/README.CSW
+	@cp $(FILEDIR)/CSW$(GARNAME).copyright $(DESTDIR)$(docdir)/$(GARNAME)/LICENSE
 	@cp $(FILEDIR)/CSW$(GARNAME).i.cswcpsampleconf $(DESTDIR)/usr/sadm/install/scripts/i.cswcpsampleconf
 	@cp $(FILEDIR)/CSW$(GARNAME).r.cswcpsampleconf $(DESTDIR)/usr/sadm/install/scripts/r.cswcpsampleconf
 	@cp $(FILEDIR)/CSW$(GARNAME).i.cswpreserveconf $(DESTDIR)/usr/sadm/install/scripts/i.cswpreserveconf

Modified: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf
===================================================================
--- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf	2009-01-07 14:29:09 UTC (rev 2755)
+++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswinitsmf	2009-01-07 16:32:18 UTC (rev 2756)
@@ -7,6 +7,7 @@
 #
 # 2008-04-21 First release
 # 2008-11-23 Fixed grep bug for FMRI
+# 2009-01-07 Fixed bug with multiple services per package
 
 DEBUG=		# clear to disable debug, set to anything to enable
 
@@ -35,16 +36,20 @@
 
 # Stop service
 echo Stopping $PKGINST ...
-if [ "$smf" = "yes" ]; then
-  # Find out FMRI complete with service name
-  FMRI=`grep ${PKGINST}$ /var/sadm/install/contents | grep "^/var/opt/csw/svc/manifest" | egrep '\.xml ' | cut -d'/' -f7- | awk -F'.xml' '{print $1}'`
-  /usr/sbin/svcadm disable svc:/$FMRI > /dev/null 2>&1
-  # Unregister with SMF
-  echo Unregister svc:/${FMRI}:default with SMF ...
-  /usr/sbin/svccfg delete svc:/${FMRI}:default >/dev/null 2>&1
-else
-  /etc/init.d/$service stop > /dev/null 2>&1
-fi
+# Find out FMRI complete with service name
+FMRI=`grep ${PKGINST}$ /var/sadm/install/contents | grep "^/var/opt/csw/svc/manifest" | egrep '\.xml ' | cut -d'/' -f7- | awk -F'.xml' '{print $1}'`
+for i in `echo $FMRI | tr '\n' ' '`
+do
+  if [ "$smf" = "yes" ]; then
+    /usr/sbin/svcadm disable svc:/$i
+    sleep 1
+    # Unregister with SMF
+    echo Unregister svc:/${i}:default with SMF ...
+    /usr/sbin/svccfg delete -f svc:/${i}:default
+  else
+    /etc/init.d/`basename $i` stop > /dev/null 2>&1
+  fi
+done
 
 # Remove files in class cswinitsmf
 echo "Removing class <cswinitsmf> ..."


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