incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vik...@apache.org
Subject svn commit: r1347224 - in /incubator/ambari/branches/ambari-186: CHANGES.txt hmc/package/rpm/SOURCES/hmc-agent.init.in
Date Thu, 07 Jun 2012 00:43:00 GMT
Author: vikram
Date: Thu Jun  7 00:43:00 2012
New Revision: 1347224

URL: http://svn.apache.org/viewvc?rev=1347224&view=rev
Log:
AMBARI-420. Improve style on error log popups. Added missing file. (Contributed by Mahadev)

Added:
    incubator/ambari/branches/ambari-186/hmc/package/rpm/SOURCES/hmc-agent.init.in
Modified:
    incubator/ambari/branches/ambari-186/CHANGES.txt

Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1347224&r1=1347223&r2=1347224&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Thu Jun  7 00:43:00 2012
@@ -5,6 +5,8 @@ should be listed by their full name. Ple
 characters wide.
 
 Release 0.1.x - unreleased
+  
+  AMBARI-420. Improve style on error log popups. Added missing file (Mahadev via Vikram)
 
   AMBARI-420. Improve style on error log popups (Yusaku via Vikram)
 

Added: incubator/ambari/branches/ambari-186/hmc/package/rpm/SOURCES/hmc-agent.init.in
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/package/rpm/SOURCES/hmc-agent.init.in?rev=1347224&view=auto
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/package/rpm/SOURCES/hmc-agent.init.in (added)
+++ incubator/ambari/branches/ambari-186/hmc/package/rpm/SOURCES/hmc-agent.init.in Thu Jun
 7 00:43:00 2012
@@ -0,0 +1,131 @@
+#! /bin/bash
+#
+# hmc-agent Bring up/down hmc-agent
+#
+# chkconfig: 345 20 80
+# description: Starts and stops the agent 
+#
+# /etc/rc.d/init.d/hmc-agent
+# See how we were called.
+#/*
+# * Licensed to the Apache Software Foundation (ASF) under one
+# * or more contributor license agreements.  See the NOTICE file
+# * distributed with this work for additional information
+# * regarding copyright ownership.  The ASF licenses this file
+# * to you under the Apache License, Version 2.0 (the
+# * "License"); you may not use this file except in compliance
+# * with the License.  You may obtain a copy of the License at
+# *
+# *     http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# */
+
+#
+# RPM Init file for puppet agent
+#
+
+PATH=/usr/bin:/sbin:/bin:/usr/sbin
+export PATH
+
+[ -f /etc/sysconfig/puppet ] && . /etc/sysconfig/puppet
+lockfile=${LOCKFILE-/var/lock/subsys/puppet}
+pidfile=${PIDFILE-/var/run/puppet/agent.pid}
+puppetd=${PUPPETD-/usr/bin/puppet}
+RETVAL=0
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Determine if we can use the -p option to daemon, killproc, and status.
+# RHEL < 5 can't.
+if status | grep -q -- '-p' 2>/dev/null; then
+    daemonopts="--pidfile $pidfile"
+    pidopts="-p $pidfile"
+fi
+hmc_server=`cat /etc/hmc/hmc-agent.conf`
+PUPPET_OPTS="agent --verbose --confdir=/etc/puppet/agent --listen --runinterval 5 --server
$hmc_server --report --no-client --waitforcert 10 --configtimeout 600 --debug --logdest=/var/log/puppet_agent.log
--httplog /var/log/puppet_agent_http.log --autoflush --use_cached_catalog"
+
+start() {
+    echo -n $"Starting puppet: "
+    daemon $daemonopts $puppetd ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS}
+    RETVAL=$?
+    echo
+    [ $RETVAL = 0 ] && touch ${lockfile}
+    return $RETVAL
+}
+
+stop() {
+    echo -n $"Stopping puppet: "
+    killproc $puppetd
+    RETVAL=$?
+    echo
+    [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
+    return $RETVAL
+}
+
+reload() {
+    echo -n $"Restarting puppet: "
+    killproc  $puppetd -HUP
+    RETVAL=$?
+    echo
+    return $RETVAL
+}
+
+restart() {
+    stop
+    start
+}
+
+rh_status() {
+    status  $puppetd
+    RETVAL=$?
+    return $RETVAL
+}
+
+rh_status_q() {
+    rh_status >/dev/null 2>&1
+}
+
+genconfig() {
+    echo -n $"Generate configuration puppet: "
+    $puppetd ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS} --genconfig
+}
+
+case "$1" in
+    start)
+        start
+    ;;
+    stop)
+        stop
+    ;;
+    restart)
+        restart
+    ;;
+    reload|force-reload)
+        reload
+    ;;
+    condrestart|try-restart)
+        rh_status_q || exit 0
+        restart
+    ;;
+    status)
+        rh_status
+    ;;
+    once)
+        shift
+        $puppetd -o ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS} $@
+        ;;
+    genconfig)
+        genconfig
+    ;;
+    *)
+        echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|once|genconfig}"
+        exit 1
+esac
+exit $RETVAL
+



Mime
View raw message