From d937e78bc4d2ed46e467eefcb21329eec6197916 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 22 Feb 2009 00:02:41 +0000 Subject: not needed anymore --- files/cluster/init.d/puppetmaster.CentOS | 121 ------------------------------- files/cluster/init.d/puppetmaster.Gentoo | 60 --------------- manifests/puppetmaster/cluster.pp | 9 --- 3 files changed, 190 deletions(-) delete mode 100755 files/cluster/init.d/puppetmaster.CentOS delete mode 100755 files/cluster/init.d/puppetmaster.Gentoo diff --git a/files/cluster/init.d/puppetmaster.CentOS b/files/cluster/init.d/puppetmaster.CentOS deleted file mode 100755 index 5edf5a9..0000000 --- a/files/cluster/init.d/puppetmaster.CentOS +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/bash -# puppetmaster This shell script enables the puppetmaster server. -# -# Author: Duane Griffin -# -# chkconfig: - 65 45 -# -# description: Server for the puppet system management tool. -# processname: puppetmaster - -PATH=/usr/bin:/sbin:/bin:/usr/sbin -export PATH - -lockfile=/var/lock/subsys/puppetmaster - -# Source function library. -. /etc/rc.d/init.d/functions - -if [ -f /etc/sysconfig/puppetmaster ]; then - . /etc/sysconfig/puppetmaster -fi - -PUPPETMASTER_OPTS="" -[ -n "$PUPPETMASTER_PID_DIR" ] || PUPPETMASTER_PID_DIR="/var/run/puppet/" -[ -n "$PUPPETMASTER_MANIFEST" ] && PUPPETMASTER_OPTS="--manifest=${PUPPETMASTER_MANIFEST}" -if [ -n "$PUPPETMASTER_PORTS" ] && [ ${#PUPPETMASTER_PORTS[@]} -gt 1 ]; then - PUPPETMASTER_OPTS="$PUPPETMASTER_OPTS --servertype=mongrel" -elif [ -n "$PUPPETMASTER_PORTS" ] && [ ${#PUPPETMASTER_PORTS[@]} -eq 1 ]; then - PUPPETMASTER_OPTS="${PUPPETMASTER_OPTS} --masterport=${PUPPETMASTER_PORTS[0]}" -fi -[ -n "$PUPPETMASTER_LOG" ] && PUPPETMASTER_OPTS="${PUPPETMASTER_OPTS} --logdest=${PUPPETMASTER_LOG}" -PUPPETMASTER_OPTS="${PUPPETMASTER_OPTS} \ - ${PUPPETMASTER_EXTRA_OPTS}" - -RETVAL=0 - -prog=puppetmasterd -PUPPETMASTER=/usr/sbin/$prog - -start() { - echo -n $"Starting puppetmaster: " - - # Confirm the manifest exists - if [ -r $PUPPETMASTER_MANIFEST ]; then - if [ -n "$PUPPETMASTER_PORTS" ] && [ ${#PUPPETMASTER_PORTS[@]} -gt 1 ]; then - echo -n " (port " - for ((i=0; i<${#PUPPETMASTER_PORTS[@]}; i++)); do - echo -n "${PUPPETMASTER_PORTS[$i]}" - daemon $PUPPETMASTER $PUPPETMASTER_OPTS --masterport=${PUPPETMASTER_PORTS[$i]} --pidfile=$PUPPETMASTER_PID_DIR/puppetmaster.${PUPPETMASTER_PORTS[$i]}.pid - RETVAL=$? || $RETVAL - done - echo -n ")" - else - daemon $PUPPETMASTER $PUPPETMASTER_OPTS - RETVAL=$? - fi - else - failure $"Manifest does not exist: $PUPPETMASTER_MANIFEST" - echo - return 1 - fi - [ $RETVAL -eq 0 ] && touch "$lockfile" - echo - return $RETVAL -} - -stop() { - echo -n $"Stopping puppetmaster: " - if [ -n "$PUPPETMASTER_PORTS" ] && [ ${#PUPPETMASTER_PORTS[@]} -gt 1 ]; then - echo -n " (port " - for ((i=0; i<${#PUPPETMASTER_PORTS[@]}; i++)); do - echo -n "${PUPPETMASTER_PORTS[$i]}" - killproc -p $PUPPETMASTER_PID_DIR/puppetmaster.${PUPPETMASTER_PORTS[$i]}.pid $PUPPETMASTER - RETVAL=$? || $RETVAL - done - echo -n ")" - else - killproc $PUPPETMASTER - RETVAL=$? - fi - echo - [ $RETVAL -eq 0 ] && rm -f "$lockfile" - return $RETVAL -} - -restart() { - stop - start -} - -genconfig() { - echo -n $"Generate configuration puppetmaster: " - $PUPPETMASTER $PUPPETMASTER_OPTS --genconfig -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart|reload|force-reload) - restart - ;; - condrestart) - [ -f "$lockfile" ] && restart - ;; - status) - status $PUPPETMASTER - RETVAL=$? - ;; - genconfig) - genconfig - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|genconfig}" - exit 1 -esac - -exit $RETVAL diff --git a/files/cluster/init.d/puppetmaster.Gentoo b/files/cluster/init.d/puppetmaster.Gentoo deleted file mode 100755 index 06c3f69..0000000 --- a/files/cluster/init.d/puppetmaster.Gentoo +++ /dev/null @@ -1,60 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -depend() { - need net - before puppet - use dns logger -} - -PORTS=( 18140 18141 18142 18143 ) - -checkconfig() { - if [[ ! -d "${PUPPETMASTER_PID_DIR}" ]] ; then - eerror "Please make sure PUPPETMASTER_PID_DIR is defined and points to a existing directory" - return 1 - fi - - local site_manifest="/etc/puppet/manifests/site.pp" - [[ -n "${PUPPETMASTER_MANIFEST}" ]] && site_manifest="${PUPPETMASTER_MANIFEST}" - - if [ ! -f "${site_manifest}" ] ; then - eerror "Please create ${site_manifest} before running puppet" - return 1 - fi - - return 0 -} - -start() { - checkconfig || return $? - - local options="" - [[ -n "${PUPPETMASTER_MANIFEST}" ]] && options="${options} --manifest=${PUPPETMASTER_MANIFEST}" - [[ -n "${PUPPETMASTER_LOG}" ]] && options="${options} --logdest=${PUPPETMASTER_LOG}" - [[ -n "${PUPPETMASTER_EXTRA_OPTS}" ]] && options="${options} ${PUPPETMASTER_EXTRA_OPTS}" - for ((i=0; i<${#PORTS[@]}; i++)); do - ebegin "Starting puppetmaster on port ${PORTS[$i]}" - start-stop-daemon --start --quiet --exec /usr/bin/puppetmasterd \ - --pidfile=${PUPPETMASTER_PID_DIR}/puppetmasterd.${PORTS[$i]}.pid \ - -- ${options} \ - --pidfile=${PUPPETMASTER_PID_DIR}/puppetmasterd.${PORTS[$i]}.pid \ - --servertype=mongrel \ - --masterport="${PORTS[$i]}" - a=$? || $a - done - eend $a "Failed to start puppetmaster" -} - -stop() { - for ((i=0; i<${#PORTS[@]}; i++)); do - ebegin "Stopping puppetmaster on port ${PORTS[$i]}" - start-stop-daemon --stop --quiet \ - --pidfile ${PUPPETMASTER_PID_DIR}/puppetmasterd.${PORTS[$i]}.pid - local ret=$? || $ret - done - eend ${ret} "Failed to stop puppetmaster" - rm -f ${PUPPETMASTER_PID_DIR}/puppetmasterd.pid - return ${ret} -} diff --git a/manifests/puppetmaster/cluster.pp b/manifests/puppetmaster/cluster.pp index 081a290..cfa3fc0 100644 --- a/manifests/puppetmaster/cluster.pp +++ b/manifests/puppetmaster/cluster.pp @@ -2,15 +2,6 @@ class puppet::puppetmaster::cluster inherits puppet::puppetmaster { include puppet::puppetmaster::cluster::base - - case $operatingsystem { - gentoo, centos: { - file{"/etc/init.d/puppetmaster": - source => "puppet://$server/puppet/cluster/init.d/puppetmaster.${operatingsystem}", - owner => root, group => 0, mode => 0755; - } - } - } } class puppet::puppetmaster::cluster::base inherits puppet::puppetmaster::base { -- cgit v1.2.3