[csw-devel] SF.net SVN: gar:[14553] csw/mgar/pkg/puppet/trunk/files

phipsy at users.sourceforge.net phipsy at users.sourceforge.net
Tue May 10 13:45:47 CEST 2011


Revision: 14553
          http://gar.svn.sourceforge.net/gar/?rev=14553&view=rev
Author:   phipsy
Date:     2011-05-10 11:45:46 +0000 (Tue, 10 May 2011)

Log Message:
-----------
Fixed puppet bugs 4767 and 4725

Modified Paths:
--------------
    csw/mgar/pkg/puppet/trunk/files/CSWpuppet.postinstall
    csw/mgar/pkg/puppet/trunk/files/cswpuppetd
    csw/mgar/pkg/puppet/trunk/files/cswpuppetmasterd

Modified: csw/mgar/pkg/puppet/trunk/files/CSWpuppet.postinstall
===================================================================
--- csw/mgar/pkg/puppet/trunk/files/CSWpuppet.postinstall	2011-05-09 03:33:28 UTC (rev 14552)
+++ csw/mgar/pkg/puppet/trunk/files/CSWpuppet.postinstall	2011-05-10 11:45:46 UTC (rev 14553)
@@ -20,7 +20,7 @@
     fi
 fi
 
-if [ ! -d $PKG_INSTALL_ROOT/opt/csw/var/puppet ]; then 
+if [ ! -d $PKG_INSTALL_ROOT/opt/csw/var/puppet -o ! -L $PKG_INSTALL_ROOT/opt/csw/var/puppet ]; then 
     /usr/sbin/chroot $PKG_INSTALL_ROOT /usr/bin/ln -s /var/lib/puppet /opt/csw/var/puppet
 fi
 

Modified: csw/mgar/pkg/puppet/trunk/files/cswpuppetd
===================================================================
--- csw/mgar/pkg/puppet/trunk/files/cswpuppetd	2011-05-09 03:33:28 UTC (rev 14552)
+++ csw/mgar/pkg/puppet/trunk/files/cswpuppetd	2011-05-10 11:45:46 UTC (rev 14553)
@@ -4,6 +4,9 @@
 #
 # /etc/opt/csw/init.d/cswpuppetd
 #
+#   2011-05-06 Mark Phillips
+#     * Check if we're on Solaris 10 before including the smf_include stuff
+#
 #   2011-03-06 Mark Phillips
 #     * Added getprop - not used, yet
 #
@@ -17,7 +20,10 @@
 #   2009-11-23 Gary Law
 #     * changed sbindir
 
-. /lib/svc/share/smf_include.sh
+# Check if we're on 10; therefore SMF
+if [ -x /usr/sbin/svcadm ]; then
+    . /lib/svc/share/smf_include.sh
+fi
 
 prefix="/opt/csw"
 exec_prefix="/opt/csw"
@@ -89,7 +95,7 @@
     echo "${__pidfile}"
 }
 
-pidfile=`get_pid_file`
+pidfile=`$prefix/bin/puppet agent --genconf | awk '/pidfile/ { print $3 }'`
 
 case "$1" in
     start)

Modified: csw/mgar/pkg/puppet/trunk/files/cswpuppetmasterd
===================================================================
--- csw/mgar/pkg/puppet/trunk/files/cswpuppetmasterd	2011-05-09 03:33:28 UTC (rev 14552)
+++ csw/mgar/pkg/puppet/trunk/files/cswpuppetmasterd	2011-05-10 11:45:46 UTC (rev 14553)
@@ -1,19 +1,25 @@
 #!/bin/sh
 #
+#   2011-05-06 Mark Phillips
+#     * Check if we're on Solaris 10 before including the smf_include stuff
+#
 #   2011-03-06 Mark Phillips
 #     * Added getprop
 #
 #   2009-11-23 Gary Law
 #     * Original version
 
-. /lib/svc/share/smf_include.sh
+# Check if we're on 10; therefore SMF
+if [ -x /usr/sbin/svcadm ]; then
+    . /lib/svc/share/smf_include.sh
+fi
 
 prefix=/opt/csw
 exec_prefix=/opt/csw
 sysconfdir=/opt/csw/etc
 sbindir=/opt/csw/sbin
 
-pidfile=/var/opt/csw/puppet/run/puppetmasterd.pid
+pidfile=`$prefix/bin/puppet master --genconf | awk '/pidfile/ { print $3 }'`
 
 getprop() {
     val=`/usr/bin/svcprop -p $1 $SMF_FMRI`


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