Revision: 20428
          http://gar.svn.sourceforge.net/gar/?rev=20428&view=rev
Author:   phipsy
Date:     2013-03-11 17:13:56 +0000 (Mon, 11 Mar 2013)
Log Message:
-----------
puppet3: fixes for mantis 5035

Modified Paths:
--------------
    csw/mgar/pkg/puppet3/trunk/files/cswpuppetd
    csw/mgar/pkg/puppet3/trunk/files/cswpuppetmasterd

Modified: csw/mgar/pkg/puppet3/trunk/files/cswpuppetd
===================================================================
--- csw/mgar/pkg/puppet3/trunk/files/cswpuppetd 2013-03-11 17:11:30 UTC (rev 
20427)
+++ csw/mgar/pkg/puppet3/trunk/files/cswpuppetd 2013-03-11 17:13:56 UTC (rev 
20428)
@@ -67,7 +67,7 @@
     else
         zoneopts=""
     fi
-    pgrep $zoneopts puppetd
+    pgrep -f $zoneopts 'puppet agent'
 }
 
 # Returns a line with certain string from a config file.

Modified: csw/mgar/pkg/puppet3/trunk/files/cswpuppetmasterd
===================================================================
--- csw/mgar/pkg/puppet3/trunk/files/cswpuppetmasterd   2013-03-11 17:11:30 UTC 
(rev 20427)
+++ csw/mgar/pkg/puppet3/trunk/files/cswpuppetmasterd   2013-03-11 17:13:56 UTC 
(rev 20428)
@@ -27,6 +27,16 @@
     [ -n "$val" ] && echo $val
 }
 
+get_current_pid() {
+    if [ -x /usr/bin/zonename ]; then
+        zone=`/usr/bin/zonename`
+        zoneopts="-z $zone"
+    else
+        zoneopts=""
+    fi
+    pgrep -f $zoneopts 'puppet master'
+}
+
 case "$1" in
 start)
     cd /
@@ -63,7 +73,7 @@
 status)
     if [ -f $pidfile ]; then
         pid=`cat $pidfile`
-        curpid=`pgrep puppetmasterd`
+        curpid=`get_current_pid`
         if [ "$pid" -eq "$curpid" ]; then
             exit 0
         else

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

_______________________________________________
devel mailing list
devel@lists.opencsw.org
https://lists.opencsw.org/mailman/listinfo/devel

Reply via email to