0001-Changed-tabs-to-spaces-without-interfering-with-inde.patch

Ian Taylor, 06/05/2009 04:13 pm

Download (585.3 kB)

b/README.queueing
56 56

  
57 57
+ StompServer
58 58

  
59
	http://rubyforge.org/projects/stompserver/
59
    http://rubyforge.org/projects/stompserver/
60 60

  
61 61
StompServer is a lightweight queueing service written in Ruby which is
62 62
suitable for testing or low volume puppet usage. Works well when both
......
67 67

  
68 68
+ Apache ActiveMQ
69 69

  
70
	http://activemq.apache.org
70
    http://activemq.apache.org
71 71

  
72 72
Considered by many to be the most popular message service in use today,
73 73
ActiveMQ has hundreds of features for scaling, persistence and so on.
......
76 76
intimidating, but for our use a one line change to the  standard configuration
77 77
is all that is required and is explained at:
78 78

  
79
	http://activemq.apache.org/stomp.html
79
    http://activemq.apache.org/stomp.html
80 80

  
81 81
Other customization of the internal workings of ActiveMQ, if any, will depend
82 82
on your needs and deployment. A quick skimming of the ActiveMQ documentation
b/autotest/puppet_rspec.rb
16 16

  
17 17
    # force a complete re-run for all of these:
18 18

  
19
	# main puppet lib
20
	at.add_mapping(%r!^lib/puppet\.rb$!) { |filename, _|
19
    # main puppet lib
20
    at.add_mapping(%r!^lib/puppet\.rb$!) { |filename, _|
21 21
        at.files_matching %r!spec/(unit|integration)/.*\.rb!
22
	}
22
    }
23 23

  
24
	# the spec_helper
25
	at.add_mapping(%r!^spec/spec_helper\.rb$!) { |filename, _|
24
    # the spec_helper
25
    at.add_mapping(%r!^spec/spec_helper\.rb$!) { |filename, _|
26 26
        at.files_matching %r!spec/(unit|integration)/.*\.rb!
27
	}
27
    }
28 28

  
29
	# the puppet test libraries
30
	at.add_mapping(%r!^test/lib/puppettest/.*!) { |filename, _|
29
    # the puppet test libraries
30
    at.add_mapping(%r!^test/lib/puppettest/.*!) { |filename, _|
31 31
        at.files_matching %r!spec/(unit|integration)/.*\.rb!
32
	}
32
    }
33 33

  
34 34
        # the puppet spec libraries
35
	at.add_mapping(%r!^spec/lib/spec.*!) { |filename, _|
35
    at.add_mapping(%r!^spec/lib/spec.*!) { |filename, _|
36 36
        at.files_matching %r!spec/(unit|integration)/.*\.rb!
37
	}
37
    }
38 38

  
39 39
        # the monkey patches for rspec
40
	at.add_mapping(%r!^spec/lib/monkey_patches/.*!) { |filename, _|
40
    at.add_mapping(%r!^spec/lib/monkey_patches/.*!) { |filename, _|
41 41
        at.files_matching %r!spec/(unit|integration)/.*\.rb!
42
	}
42
    }
43 43
end
44 44

  
45 45
# a place for overrides when necessary.
b/conf/gentoo/init.d/puppetmaster
3 3
# Distributed under the terms of the GNU General Public License v2
4 4

  
5 5
depend() {
6
	need net
7
	before puppet
8
	use dns logger
6
    need net
7
    before puppet
8
    use dns logger
9 9
}
10 10

  
11 11
checkconfig() {
12
	if [[ ! -d "${PUPPETMASTER_PID_DIR}" ]] ; then
13
		eerror "Please make sure PUPPETMASTER_PID_DIR is defined and points to a existing directory"
14
		return 1
15
	fi
12
    if [[ ! -d "${PUPPETMASTER_PID_DIR}" ]] ; then
13
        eerror "Please make sure PUPPETMASTER_PID_DIR is defined and points to a existing directory"
14
        return 1
15
    fi
16 16

  
17
	local site_manifest="/etc/puppet/manifests/site.pp"
18
	[[ -n "${PUPPETMASTER_MANIFEST}" ]] && site_manifest="${PUPPETMASTER_MANIFEST}"
17
    local site_manifest="/etc/puppet/manifests/site.pp"
18
    [[ -n "${PUPPETMASTER_MANIFEST}" ]] && site_manifest="${PUPPETMASTER_MANIFEST}"
19 19

  
20
	if [ ! -f "${site_manifest}" ] ; then
21
		eerror "Please create ${site_manifest} before running puppet"
22
		return 1
23
	fi
20
    if [ ! -f "${site_manifest}" ] ; then
21
        eerror "Please create ${site_manifest} before running puppet"
22
        return 1
23
    fi
24 24

  
25
	return 0
25
    return 0
26 26
}
27 27

  
28 28
start() {
29
	checkconfig || return $?
29
    checkconfig || return $?
30 30

  
31
	local options=""
32
	[[ -n "${PUPPETMASTER_MANIFEST}" ]]   && options="${options} --manifest=${PUPPETMASTER_MANIFEST}"
33
	[[ -n "${PUPPETMASTER_LOG}" ]]        && options="${options} --logdest=${PUPPETMASTER_LOG}"
34
	[[ -n "${PUPPETMASTER_EXTRA_OPTS}" ]] && options="${options} ${PUPPETMASTER_EXTRA_OPTS}"
31
    local options=""
32
    [[ -n "${PUPPETMASTER_MANIFEST}" ]]   && options="${options} --manifest=${PUPPETMASTER_MANIFEST}"
33
    [[ -n "${PUPPETMASTER_LOG}" ]]        && options="${options} --logdest=${PUPPETMASTER_LOG}"
34
    [[ -n "${PUPPETMASTER_EXTRA_OPTS}" ]] && options="${options} ${PUPPETMASTER_EXTRA_OPTS}"
35 35

  
36
	ebegin "Starting puppetmaster"
37
	start-stop-daemon --start --quiet --exec /usr/bin/ruby /usr/bin/puppetmasterd \
38
		-- ${options}
39
	eend $? "Failed to start puppetmaster"
36
    ebegin "Starting puppetmaster"
37
    start-stop-daemon --start --quiet --exec /usr/bin/ruby /usr/bin/puppetmasterd \
38
        -- ${options}
39
    eend $? "Failed to start puppetmaster"
40 40
}
41 41

  
42 42
stop() {
43
	ebegin "Stopping puppetmaster"
44
	start-stop-daemon --stop --quiet \
45
		--pidfile ${PUPPETMASTER_PID_DIR}/puppetmasterd.pid
46
	local ret=$?
47
	eend ${ret} "Failed to stop puppetmaster"
48
	rm -f ${PUPPETMASTER_PID_DIR}/puppetmasterd.pid
49
	return ${ret}
43
    ebegin "Stopping puppetmaster"
44
    start-stop-daemon --stop --quiet \
45
        --pidfile ${PUPPETMASTER_PID_DIR}/puppetmasterd.pid
46
    local ret=$?
47
    eend ${ret} "Failed to stop puppetmaster"
48
    rm -f ${PUPPETMASTER_PID_DIR}/puppetmasterd.pid
49
    return ${ret}
50 50
}
51 51

  
b/conf/osx/PackageInfo.plist
2 2
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3 3
<plist version="1.0">
4 4
<dict>
5
	<key>CFBundleIdentifier</key>
6
	<string>com.reductivelabs.puppet</string>
7
	<key>CFBundleShortVersionString</key>
8
	<string>{SHORTVERSION}</string>
9
	<key>IFMajorVersion</key>
10
	<integer>{MAJORVERSION}</integer>
11
	<key>IFMinorVersion</key>
12
	<integer>{MINORVERSION}</integer>
13
	<key>IFPkgFlagAllowBackRev</key>
14
	<false/>
15
	<key>IFPkgFlagAuthorizationAction</key>
16
	<string>RootAuthorization</string>
17
	<key>IFPkgFlagDefaultLocation</key>
18
	<string>/</string>
19
	<key>IFPkgFlagFollowLinks</key>
20
	<true/>
21
	<key>IFPkgFlagInstallFat</key>
22
	<false/>
23
	<key>IFPkgFlagIsRequired</key>
24
	<false/>
25
	<key>IFPkgFlagOverwritePermissions</key>
26
	<false/>
27
	<key>IFPkgFlagRelocatable</key>
28
	<false/>
29
	<key>IFPkgFlagRestartAction</key>
30
	<string>None</string>
31
	<key>IFPkgFlagRootVolumeOnly</key>
32
	<true/>
33
	<key>IFPkgFlagUpdateInstalledLanguages</key>
34
	<false/>
5
    <key>CFBundleIdentifier</key>
6
    <string>com.reductivelabs.puppet</string>
7
    <key>CFBundleShortVersionString</key>
8
    <string>{SHORTVERSION}</string>
9
    <key>IFMajorVersion</key>
10
    <integer>{MAJORVERSION}</integer>
11
    <key>IFMinorVersion</key>
12
    <integer>{MINORVERSION}</integer>
13
    <key>IFPkgFlagAllowBackRev</key>
14
    <false/>
15
    <key>IFPkgFlagAuthorizationAction</key>
16
    <string>RootAuthorization</string>
17
    <key>IFPkgFlagDefaultLocation</key>
18
    <string>/</string>
19
    <key>IFPkgFlagFollowLinks</key>
20
    <true/>
21
    <key>IFPkgFlagInstallFat</key>
22
    <false/>
23
    <key>IFPkgFlagIsRequired</key>
24
    <false/>
25
    <key>IFPkgFlagOverwritePermissions</key>
26
    <false/>
27
    <key>IFPkgFlagRelocatable</key>
28
    <false/>
29
    <key>IFPkgFlagRestartAction</key>
30
    <string>None</string>
31
    <key>IFPkgFlagRootVolumeOnly</key>
32
    <true/>
33
    <key>IFPkgFlagUpdateInstalledLanguages</key>
34
    <false/>
35 35
</dict>
36 36
</plist>
b/conf/redhat/client.init
33 33
##[ -n "$INIT_VERSION" ] && PUPPET_OPTS="${PUPPET_OPTS} --fullrun"
34 34

  
35 35
start() {
36
	echo -n $"Starting puppet: "
37
        daemon $puppetd ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS}
38
	RETVAL=$?
39
	echo
36
    echo -n $"Starting puppet: "
37
    daemon $puppetd ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS}
38
    RETVAL=$?
39
    echo
40 40
        [ $RETVAL = 0 ] && touch ${lockfile}
41 41
        return $RETVAL
42 42
}
43 43

  
44 44
stop() {
45
	echo -n $"Stopping puppet: "
46
        killproc $puppetd
47
	RETVAL=$?
48
	echo
49
	[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
45
    echo -n $"Stopping puppet: "
46
    killproc $puppetd
47
    RETVAL=$?
48
    echo
49
    [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
50 50
}
51 51

  
52 52
reload() {
53
	echo -n $"Restarting puppet: "
54
        killproc $puppetd -HUP
55
	RETVAL=$?
56
	echo
57
	return $RETVAL
53
    echo -n $"Restarting puppet: "
54
    killproc $puppetd -HUP
55
    RETVAL=$?
56
    echo
57
    return $RETVAL
58 58
}
59 59

  
60 60
restart() {
......
63 63
}
64 64

  
65 65
genconfig() {
66
  echo -n $"Generate configuration puppet: "
67
  $puppetd ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS} --genconfig
66
    echo -n $"Generate configuration puppet: "
67
    $puppetd ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS} --genconfig
68 68
}
69 69

  
70 70
case "$1" in
71
  start)
72
	start
73
	;;
74
  stop) 
75
	stop
76
	;;
77
  restart)
78
	restart
79
	;;
80
  reload|force-reload)
71
    start)
72
        start
73
    ;;
74
    stop)
75
        stop
76
    ;;
77
    restart)
78
        restart
79
    ;;
80
    reload|force-reload)
81 81
        reload
82
	;;
83
  condrestart|try-restart)
84
	[ -f "$pidfile" ] && restart
85
	;;
86
  status)
82
    ;;
83
    condrestart|try-restart)
84
        [ -f "$pidfile" ] && restart
85
    ;;
86
    status)
87 87
        status -p "$pidfile" $puppetd
88 88
        RETVAL=$?
89
	;;
90
  once)
89
    ;;
90
    once)
91 91
        shift
92 92
        $puppetd -o ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS} $@
93 93
        ;;
94
  genconfig)
95
	genconfig
96
	;;
97
  *)
98
	echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|once|genconfig}"
99
	exit 1
94
    genconfig)
95
        genconfig
96
    ;;
97
    *)
98
        echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|once|genconfig}"
99
        exit 1
100 100
esac
101 101

  
102 102
exit $RETVAL
b/conf/redhat/server.init
18 18
. /etc/rc.d/init.d/functions
19 19

  
20 20
if [ -f /etc/sysconfig/puppetmaster ]; then
21
	. /etc/sysconfig/puppetmaster
21
    . /etc/sysconfig/puppetmaster
22 22
fi
23 23

  
24 24
PUPPETMASTER_OPTS=""
......
30 30
fi
31 31
[ -n "$PUPPETMASTER_LOG" ] && PUPPETMASTER_OPTS="${PUPPETMASTER_OPTS} --logdest=${PUPPETMASTER_LOG}"
32 32
PUPPETMASTER_OPTS="${PUPPETMASTER_OPTS} \
33
	${PUPPETMASTER_EXTRA_OPTS}"
33
    ${PUPPETMASTER_EXTRA_OPTS}"
34 34

  
35 35
RETVAL=0
36 36

  
......
38 38
PUPPETMASTER=/usr/sbin/$prog
39 39

  
40 40
start() {
41
	echo -n $"Starting puppetmaster: "
41
    echo -n $"Starting puppetmaster: "
42 42

  
43
	# Confirm the manifest exists
44
	if [ -r $PUPPETMASTER_MANIFEST ]; then
43
    # Confirm the manifest exists
44
    if [ -r $PUPPETMASTER_MANIFEST ]; then
45 45
        if [ -n "$PUPPETMASTER_PORTS" ] && [ ${#PUPPETMASTER_PORTS[@]} -gt 1 ]; then
46 46
            for ((i=0; i<${#PUPPETMASTER_PORTS[@]}; i++)); do
47 47
                echo -en "\nPort: ${PUPPETMASTER_PORTS[$i]}"
......
52 52
            daemon $PUPPETMASTER $PUPPETMASTER_OPTS
53 53
            RETVAL=$?
54 54
        fi
55
	else
56
		failure $"Manifest does not exist: $PUPPETMASTER_MANIFEST"
57
		echo
58
		return 1
59
	fi
60
	[ $RETVAL -eq 0 ] && touch "$lockfile"
61
	echo
62
	return $RETVAL
55
    else
56
        failure $"Manifest does not exist: $PUPPETMASTER_MANIFEST"
57
        echo
58
        return 1
59
    fi
60
    [ $RETVAL -eq 0 ] && touch "$lockfile"
61
    echo
62
    return $RETVAL
63 63
}
64 64

  
65 65
stop() {
66
	echo -n  $"Stopping puppetmaster: "
66
    echo -n  $"Stopping puppetmaster: "
67 67
    if [ -n "$PUPPETMASTER_PORTS" ] && [ ${#PUPPETMASTER_PORTS[@]} -gt 1 ]; then
68 68
        for ((i=0; i<${#PUPPETMASTER_PORTS[@]}; i++)); do
69 69
            echo -en "\nPort: ${PUPPETMASTER_PORTS[$i]}"
......
74 74
       killproc $PUPPETMASTER
75 75
       RETVAL=$?
76 76
    fi
77
	echo
78
	[ $RETVAL -eq 0 ] && rm -f "$lockfile"
79
	return $RETVAL
77
    echo
78
    [ $RETVAL -eq 0 ] && rm -f "$lockfile"
79
    return $RETVAL
80 80
}
81 81

  
82 82
restart() {
......
97 97
            ret=$?; [ $ret != 0 ] && RETVAL=$ret
98 98
        done 
99 99
    else
100
	    status $PUPPETMASTER
100
        status $PUPPETMASTER
101 101
        RETVAL=$?
102 102
    fi
103 103
    return $RETVAL
......
105 105

  
106 106
case "$1" in
107 107
  start)
108
	start
109
	;;
110
  stop) 
111
	stop
112
	;;
113
  restart|reload|force-reload)
108
      start
109
    ;;
110
    stop)
111
        stop
112
    ;;
113
    restart|reload|force-reload)
114 114
        restart
115
	;;
116
  condrestart)
117
	[ -f "$lockfile" ] && restart
118
	;;
119
  status)
120
    puppetmaster_status
121
	;;
122
  genconfig)
123
	genconfig
124
	;;
125
  *)
126
	echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|genconfig}"
127
	exit 1
115
    ;;
116
    condrestart)
117
        [ -f "$lockfile" ] && restart
118
    ;;
119
    status)
120
        puppetmaster_status
121
    ;;
122
    genconfig)
123
        genconfig
124
    ;;
125
    *)
126
        echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|genconfig}"
127
        exit 1
128 128
esac
129 129

  
130 130
exit $RETVAL
b/conf/solaris/smf/puppetd.xml
7 7

  
8 8

  
9 9
<service
10
	name='network/puppetd'
11
	type='service'
12
	version='1'>
10
    name='network/puppetd'
11
    type='service'
12
    version='1'>
13 13

  
14
        <create_default_instance enabled='true'/>
15
        <single_instance/>
14
    <create_default_instance enabled='true'/>
15
    <single_instance/>
16 16

  
17
        <dependency name='config-file'
18
                    grouping='require_all'
19
                    restart_on='none'
20
                    type='path'>
21
                <service_fmri value='file:///etc/puppet/puppet.conf'/>
22
        </dependency>
17
    <dependency name='config-file'
18
                grouping='require_all'
19
                restart_on='none'
20
                type='path'>
21
        <service_fmri value='file:///etc/puppet/puppet.conf'/>
22
    </dependency>
23 23
        
24
	<dependency name='loopback'
25
		    grouping='require_all'
26
		    restart_on='error'
27
		    type='service'>
28
		<service_fmri value='svc:/network/loopback:default'/>
29
	</dependency>
24
    <dependency name='loopback'
25
                grouping='require_all'
26
                restart_on='error'
27
                type='service'>
28
        <service_fmri value='svc:/network/loopback:default'/>
29
    </dependency>
30 30

  
31
	<dependency name='physical'
32
		    grouping='require_all'
33
		    restart_on='error'
34
		    type='service'>
35
		<service_fmri value='svc:/network/physical:default'/>
36
	</dependency>
31
    <dependency name='physical'
32
                grouping='require_all'
33
                restart_on='error'
34
                type='service'>
35
        <service_fmri value='svc:/network/physical:default'/>
36
    </dependency>
37 37

  
38
	<dependency name='fs-local'
39
		    grouping='require_all'
40
		    restart_on='none'
41
		    type='service'>
42
		<service_fmri value='svc:/system/filesystem/local'/>
43
	</dependency>
38
    <dependency name='fs-local'
39
                grouping='require_all'
40
                restart_on='none'
41
                type='service'>
42
        <service_fmri value='svc:/system/filesystem/local'/>
43
    </dependency>
44 44

  
45
	<exec_method
46
		type='method'
47
		name='start'
45
    <exec_method
46
        type='method'
47
        name='start'
48 48
        exec='/opt/csw/lib/svc/method/svc-puppetd start'
49
		timeout_seconds='60' />
49
        timeout_seconds='60' />
50 50

  
51
	<exec_method
52
		type='method'
53
		name='stop'
51
    <exec_method
52
        type='method'
53
        name='stop'
54 54
        exec='/opt/csw/lib/svc/method/svc-puppetd stop'
55
		timeout_seconds='60' />
55
        timeout_seconds='60' />
56 56

  
57
	<exec_method
58
		type='method'
59
		name='refresh'
57
    <exec_method
58
        type='method'
59
        name='refresh'
60 60
        exec='/opt/csw/lib/svc/method/svc-puppetd reload'
61
		timeout_seconds='60' />
61
        timeout_seconds='60' />
62 62

  
63
	<stability value='Unstable' />
63
    <stability value='Unstable' />
64 64

  
65
	<template>
66
		<common_name>
67
			<loctext xml:lang='C'>Puppet Client Daemon</loctext>
68
		</common_name>
69
		<documentation>
70
			<manpage title='puppetd' section='1' />
71
			<doc_link name='reductivelabs.com'
72
				uri='http://www.reductivelabs.com/projects/puppet' />
73
		</documentation>
74
	</template>
65
    <template>
66
        <common_name>
67
            <loctext xml:lang='C'>Puppet Client Daemon</loctext>
68
        </common_name>
69
        <documentation>
70
            <manpage title='puppetd' section='1' />
71
            <doc_link name='reductivelabs.com'
72
                uri='http://www.reductivelabs.com/projects/puppet' />
73
        </documentation>
74
    </template>
75 75
</service>
76 76

  
77 77
</service_bundle>
b/conf/solaris/smf/puppetmasterd.xml
7 7

  
8 8

  
9 9
<service
10
	name='network/puppetmasterd'
11
	type='service'
12
	version='1'>
10
    name='network/puppetmasterd'
11
    type='service'
12
    version='1'>
13 13

  
14
        <create_default_instance enabled='true'/>
15
        <single_instance/>
14
    <create_default_instance enabled='true'/>
15
    <single_instance/>
16 16

  
17
        <dependency name='config-file'
18
                    grouping='require_all'
19
                    restart_on='none'
20
                    type='path'>
21
                <service_fmri value='file:///etc/puppet/puppet.conf'/>
22
        </dependency>
17
    <dependency name='config-file'
18
                grouping='require_all'
19
                restart_on='none'
20
                type='path'>
21
        <service_fmri value='file:///etc/puppet/puppet.conf'/>
22
    </dependency>
23 23
        
24
	<dependency name='loopback'
25
		    grouping='require_all'
26
		    restart_on='error'
27
		    type='service'>
28
		<service_fmri value='svc:/network/loopback:default'/>
29
	</dependency>
24
    <dependency name='loopback'
25
                grouping='require_all'
26
                restart_on='error'
27
                type='service'>
28
        <service_fmri value='svc:/network/loopback:default'/>
29
    </dependency>
30 30

  
31
	<dependency name='physical'
32
		    grouping='require_all'
33
		    restart_on='error'
34
		    type='service'>
35
		<service_fmri value='svc:/network/physical:default'/>
36
	</dependency>
31
    <dependency name='physical'
32
                grouping='require_all'
33
                restart_on='error'
34
                type='service'>
35
        <service_fmri value='svc:/network/physical:default'/>
36
    </dependency>
37 37

  
38
	<dependency name='fs-local'
39
		    grouping='require_all'
40
		    restart_on='none'
41
		    type='service'>
42
		<service_fmri value='svc:/system/filesystem/local'/>
43
	</dependency>
38
    <dependency name='fs-local'
39
                grouping='require_all'
40
                restart_on='none'
41
                type='service'>
42
        <service_fmri value='svc:/system/filesystem/local'/>
43
    </dependency>
44 44

  
45
	<exec_method
46
		type='method'
47
		name='start'
45
    <exec_method
46
        type='method'
47
        name='start'
48 48
        exec='/opt/csw/lib/svc/method/svc-puppetmasterd start'
49
		timeout_seconds='60' />
49
        timeout_seconds='60' />
50 50

  
51
	<exec_method
52
		type='method'
53
		name='stop'
51
    <exec_method
52
        type='method'
53
        name='stop'
54 54
        exec='/opt/csw/lib/svc/method/svc-puppetmasterd stop'
55
		timeout_seconds='60' />
55
        timeout_seconds='60' />
56 56

  
57
	<exec_method
58
		type='method'
59
		name='refresh'
57
    <exec_method
58
        type='method'
59
        name='refresh'
60 60
        exec='/opt/csw/lib/svc/method/svc-puppetmasterd reload'
61
		timeout_seconds='60' />
61
        timeout_seconds='60' />
62 62

  
63
	<stability value='Unstable' />
63
    <stability value='Unstable' />
64 64

  
65
	<template>
66
		<common_name>
67
			<loctext xml:lang='C'>Puppet Server Daemon</loctext>
68
		</common_name>
69
		<documentation>
70
			<manpage title='puppetmasterd' section='1' />
71
			<doc_link name='reductivelabs.com'
72
				uri='http://www.reductivelabs.com/projects/puppet' />
73
		</documentation>
74
	</template>
65
    <template>
66
        <common_name>
67
            <loctext xml:lang='C'>Puppet Server Daemon</loctext>
68
        </common_name>
69
        <documentation>
70
            <manpage title='puppetmasterd' section='1' />
71
            <doc_link name='reductivelabs.com'
72
                uri='http://www.reductivelabs.com/projects/puppet' />
73
        </documentation>
74
    </template>
75 75
</service>
76 76

  
77 77
</service_bundle>
b/conf/solaris/smf/svc-puppetd
45 45

  
46 46
    kill -HUP `cat $pidfile`
47 47

  
48
	printf " puppetd"
49
	echo ""
48
    printf " puppetd"
49
    echo ""
50 50
    ;;
51 51
status)
52 52
    if [ -f $pidfile ]; then
b/conf/solaris/smf/svc-puppetmasterd
41 41

  
42 42
    kill -HUP `cat $pidfile`
43 43

  
44
	printf " puppetmasterd"
45
	echo ""
44
    printf " puppetmasterd"
45
    echo ""
46 46
    ;;
47 47
status)
48 48
    if [ -f $pidfile ]; then
b/conf/suse/client.init
66 66

  
67 67
        # startproc should return 0, even if service is
68 68
        # already running to match LSB spec.
69
	startproc $puppetd ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS} && touch ${lockfile}
69
        startproc $puppetd ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS} && touch ${lockfile}
70 70
        # Remember status and be verbose
71 71
        rc_status -v
72 72
        ;;
......
112 112
        ## signalling, do nothing (!)
113 113

  
114 114
        # If it supports signalling:
115
	echo -n "Reload puppet services."
116
	killproc -HUP  $puppetd
115
        echo -n "Reload puppet services."
116
        killproc -HUP  $puppetd
117 117
        rc_status -v
118 118
        ;;
119 119
    status)
b/conf/suse/puppet.spec
110 110

  
111 111
%preun
112 112
if [ "$1" = 0 ] ; then
113
	/sbin/service puppet stop > /dev/null 2>&1
114
	/sbin/chkconfig --del puppet
113
    /sbin/service puppet stop > /dev/null 2>&1
114
    /sbin/chkconfig --del puppet
115 115
fi
116 116

  
117 117
%preun server
118 118
if [ "$1" = 0 ] ; then
119
	/sbin/service puppetmaster stop > /dev/null 2>&1
120
	/sbin/chkconfig --del puppetmaster
119
    /sbin/service puppetmaster stop > /dev/null 2>&1
120
    /sbin/chkconfig --del puppetmaster
121 121
fi
122 122

  
123 123
%postun server
124 124
if [ "$1" -ge 1 ]; then
125
	 /sbin/service puppetmaster try-restart > /dev/null 2>&1
125
    /sbin/service puppetmaster try-restart > /dev/null 2>&1
126 126
fi
127 127

  
128 128
%clean
b/conf/suse/server.init
36 36
[ -f /etc/rc.status ] && . /etc/rc.status
37 37

  
38 38
if [ -f /etc/sysconfig/puppetmaster ]; then
39
	. /etc/sysconfig/puppetmaster
39
    . /etc/sysconfig/puppetmaster
40 40
fi
41 41

  
42 42
[ -z "$PUPPETMASTER_MANIFEST" ] && PUPPETMASTER_MANIFEST=/etc/puppet/manifests/site.pp
43 43
[ -z "$PUPPETMASTER_LOG" ] && PUPPETMASTER_LOG="/var/log/puppet/puppetmaster.log"
44 44
PUPPETMASTER_OPTS="
45
	--manifest=$PUPPETMASTER_MANIFEST \
46
	--logdest=${PUPPETMASTER_LOG} \
47
	${PUPPETMASTER_EXTRA_OPTS}"
45
    --manifest=$PUPPETMASTER_MANIFEST \
46
    --logdest=${PUPPETMASTER_LOG} \
47
    ${PUPPETMASTER_EXTRA_OPTS}"
48 48
PUPPET_OPTS=""
49 49
[ -n "${PUPPET_SERVER}" ] && PUPPET_OPTS="--server=${PUPPET_SERVER}"
50 50
[ -n "$PUPPET_LOG" ] && PUPPET_OPTS="${PUPPET_OPTS} --logdest=${PUPPET_LOG}"
......
54 54
PUPPETMASTER=/usr/sbin/$prog
55 55

  
56 56
start() {
57
	echo -n $"Starting puppetmaster: "
57
    echo -n $"Starting puppetmaster: "
58 58

  
59
	echo
60
	return $RETVAL
59
    echo
60
    return $RETVAL
61 61
}
62 62
# First reset status of this service
63 63
rc_reset
......
84 84

  
85 85
        # startproc should return 0, even if service is
86 86
        # already running to match LSB spec.
87
	# Confirm the manifest exists
88
	if [ -r $PUPPETMASTER_MANIFEST ]; then
89
		startproc $PUPPETMASTER $PUPPETMASTER_OPTS && touch "$lockfile"
90
	else
91
		rc_failed 
92
		echo "Manifest does not exist: $PUPPETMASTER_MANIFEST"
93
	fi
87
        # Confirm the manifest exists
88
        if [ -r $PUPPETMASTER_MANIFEST ]; then
89
            startproc $PUPPETMASTER $PUPPETMASTER_OPTS && touch "$lockfile"
90
        else
91
            rc_failed
92
            echo "Manifest does not exist: $PUPPETMASTER_MANIFEST"
93
        fi
94 94
        # Remember status and be verbose
95 95
        rc_status -v
96 96
        ;;
......
136 136
        ## signalling, do nothing (!)
137 137

  
138 138
        # If it supports signalling:
139
	echo -n "Reload puppet services."
140
	killproc -HUP  $PUPPETMASTER
139
        echo -n "Reload puppet services."
140
        killproc -HUP  $PUPPETMASTER
141 141
        rc_status -v
142 142
        ;;
143 143
    status)
b/examples/etc/init.d/sleeper
51 51
case "$1" in
52 52
    start)
53 53
        start
54
	;;
54
    ;;
55 55
    stop)
56 56
        stop
57
	;;
57
    ;;
58 58
    restart)
59 59
        stop; start
60
	;;
60
    ;;
61 61
    status)
62 62
        output=`status`
63 63
        #status
64 64
        exit $?
65
	;;
66
  *)
67
	echo "Usage: $N {start|stop|restart|force-reload}" >&2
68
	exit 1
69
	;;
65
    ;;
66
    *)
67
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
68
        exit 1
69
    ;;
70 70
esac
71 71

  
72 72
exit 0
b/examples/mcx_dock_default.pp
4 4
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
5 5
<plist version="1.0">
6 6
<dict>
7
	<key>com.apple.dock</key>
8
	<dict>
9
		<key>AppItems-Raw</key>
10
		<dict>
11
			<key>state</key>
12
			<string>always</string>
13
			<key>upk</key>
14
			<dict>
15
				<key>mcx_input_key_names</key>
16
				<array>
17
					<string>AppItems-Raw</string>
18
				</array>
19
				<key>mcx_output_key_name</key>
20
				<string>static-apps</string>
21
				<key>mcx_remove_duplicates</key>
22
				<true/>
23
			</dict>
24
			<key>value</key>
25
			<array>
26
				<dict>
27
					<key>mcx_typehint</key>
28
					<integer>1</integer>
29
					<key>tile-data</key>
30
					<dict>
31
						<key>file-data</key>
32
						<dict>
33
							<key>_CFURLString</key>
34
							<string>/Applications/Mail.app</string>
35
							<key>_CFURLStringType</key>
36
							<integer>0</integer>
37
						</dict>
38
						<key>file-label</key>
39
						<string>Mail</string>
40
					</dict>
41
					<key>tile-type</key>
42
					<string>file-tile</string>
43
				</dict>
44
				<dict>
45
					<key>mcx_typehint</key>
46
					<integer>1</integer>
47
					<key>tile-data</key>
48
					<dict>
49
						<key>file-data</key>
50
						<dict>
51
							<key>_CFURLString</key>
52
							<string>/Applications/Safari.app</string>
53
							<key>_CFURLStringType</key>
54
							<integer>0</integer>
55
						</dict>
56
						<key>file-label</key>
57
						<string>Safari</string>
58
					</dict>
59
					<key>tile-type</key>
60
					<string>file-tile</string>
61
				</dict>
62
			</array>
63
		</dict>
64
		<key>DocItems-Raw</key>
65
		<dict>
66
			<key>state</key>
67
			<string>always</string>
68
			<key>upk</key>
69
			<dict>
70
				<key>mcx_input_key_names</key>
71
				<array>
72
					<string>DocItems-Raw</string>
73
				</array>
74
				<key>mcx_output_key_name</key>
75
				<string>static-others</string>
76
				<key>mcx_remove_duplicates</key>
77
				<true/>
78
			</dict>
79
			<key>value</key>
80
			<array/>
81
		</dict>
82
		<key>MCXDockSpecialFolders-Raw</key>
83
		<dict>
84
			<key>state</key>
85
			<string>always</string>
86
			<key>upk</key>
87
			<dict>
88
				<key>mcx_input_key_names</key>
89
				<array>
90
					<string>MCXDockSpecialFolders-Raw</string>
91
				</array>
92
				<key>mcx_output_key_name</key>
93
				<string>MCXDockSpecialFolders</string>
94
				<key>mcx_remove_duplicates</key>
95
				<true/>
96
			</dict>
97
			<key>value</key>
98
			<array/>
99
		</dict>
100
		<key>contents-immutable</key>
101
		<dict>
102
			<key>state</key>
103
			<string>always</string>
104
			<key>value</key>
105
			<false/>
106
		</dict>
107
		<key>static-only</key>
108
		<dict>
109
			<key>state</key>
110
			<string>always</string>
111
			<key>value</key>
112
			<false/>
113
		</dict>
114
	</dict>
7
    <key>com.apple.dock</key>
8
    <dict>
9
        <key>AppItems-Raw</key>
10
        <dict>
11
            <key>state</key>
12
            <string>always</string>
13
            <key>upk</key>
14
            <dict>
15
                <key>mcx_input_key_names</key>
16
                <array>
17
                    <string>AppItems-Raw</string>
18
                </array>
19
                <key>mcx_output_key_name</key>
20
                <string>static-apps</string>
21
                <key>mcx_remove_duplicates</key>
22
                <true/>
23
            </dict>
24
            <key>value</key>
25
            <array>
26
                <dict>
27
                    <key>mcx_typehint</key>
28
                    <integer>1</integer>
29
                    <key>tile-data</key>
30
                    <dict>
31
                        <key>file-data</key>
32
                        <dict>
33
                            <key>_CFURLString</key>
34
                            <string>/Applications/Mail.app</string>
35
                            <key>_CFURLStringType</key>
36
                            <integer>0</integer>
37
                        </dict>
38
                        <key>file-label</key>
39
                        <string>Mail</string>
40
                    </dict>
41
                    <key>tile-type</key>
42
                    <string>file-tile</string>
43
                </dict>
44
                <dict>
45
                    <key>mcx_typehint</key>
46
                    <integer>1</integer>
47
                    <key>tile-data</key>
48
                    <dict>
49
                        <key>file-data</key>
50
                        <dict>
51
                            <key>_CFURLString</key>
52
                            <string>/Applications/Safari.app</string>
53
                            <key>_CFURLStringType</key>
54
                            <integer>0</integer>
55
                        </dict>
56
                        <key>file-label</key>
57
                        <string>Safari</string>
58
                    </dict>
59
                    <key>tile-type</key>
60
                    <string>file-tile</string>
61
                </dict>
62
            </array>
63
        </dict>
64
        <key>DocItems-Raw</key>
65
        <dict>
66
            <key>state</key>
67
            <string>always</string>
68
            <key>upk</key>
69
            <dict>
70
                <key>mcx_input_key_names</key>
71
                <array>
72
                    <string>DocItems-Raw</string>
73
                </array>
74
                <key>mcx_output_key_name</key>
75
                <string>static-others</string>
76
                <key>mcx_remove_duplicates</key>
77
                <true/>
78
            </dict>
79
            <key>value</key>
80
            <array/>
81
        </dict>
82
        <key>MCXDockSpecialFolders-Raw</key>
83
        <dict>
84
            <key>state</key>
85
            <string>always</string>
86
            <key>upk</key>
87
            <dict>
88
                <key>mcx_input_key_names</key>
89
                <array>
90
                    <string>MCXDockSpecialFolders-Raw</string>
91
                </array>
92
                <key>mcx_output_key_name</key>
93
                <string>MCXDockSpecialFolders</string>
94
                <key>mcx_remove_duplicates</key>
95
                <true/>
96
            </dict>
97
            <key>value</key>
98
            <array/>
99
        </dict>
100
        <key>contents-immutable</key>
101
        <dict>
102
            <key>state</key>
103
            <string>always</string>
104
            <key>value</key>
105
            <false/>
106
        </dict>
107
        <key>static-only</key>
108
        <dict>
109
            <key>state</key>
110
            <string>always</string>
111
            <key>value</key>
112
            <false/>
113
        </dict>
114
    </dict>
115 115
</dict>
116 116
</plist>
117 117
'
b/examples/mcx_dock_full.pp
11 11
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
12 12
<plist version="1.0">
13 13
<dict>
14
	<key>com.apple.dock</key>
15
	<dict>
16
		<key>AppItems-Raw</key>
17
		<dict>
18
			<key>state</key>
19
			<string>always</string>
20
			<key>upk</key>
21
			<dict>
22
				<key>mcx_input_key_names</key>
23
				<array>
24
					<string>AppItems-Raw</string>
25
				</array>
26
				<key>mcx_output_key_name</key>
27
				<string>static-apps</string>
28
				<key>mcx_remove_duplicates</key>
29
				<true/>
30
			</dict>
31
			<key>value</key>
32
			<array>
33
				<dict>
34
					<key>mcx_typehint</key>
35
					<integer>1</integer>
36
					<key>tile-data</key>
37
					<dict>
38
						<key>file-data</key>
39
						<dict>
40
							<key>_CFURLString</key>
41
							<string>/Applications/Mail.app</string>
42
							<key>_CFURLStringType</key>
43
							<integer>0</integer>
44
						</dict>
45
						<key>file-label</key>
46
						<string>Mail</string>
47
					</dict>
48
					<key>tile-type</key>
49
					<string>file-tile</string>
50
				</dict>
51
				<dict>
52
					<key>mcx_typehint</key>
53
					<integer>1</integer>
54
					<key>tile-data</key>
55
					<dict>
56
						<key>file-data</key>
57
						<dict>
58
							<key>_CFURLString</key>
59
							<string>/Applications/Safari.app</string>
60
							<key>_CFURLStringType</key>
61
							<integer>0</integer>
62
						</dict>
63
						<key>file-label</key>
64
						<string>Safari</string>
65
					</dict>
66
					<key>tile-type</key>
67
					<string>file-tile</string>
68
				</dict>
69
			</array>
70
		</dict>
71
		<key>DocItems-Raw</key>
72
		<dict>
73
			<key>state</key>
74
			<string>always</string>
75
			<key>upk</key>
76
			<dict>
77
				<key>mcx_input_key_names</key>
78
				<array>
79
					<string>DocItems-Raw</string>
80
				</array>
81
				<key>mcx_output_key_name</key>
82
				<string>static-others</string>
83
				<key>mcx_remove_duplicates</key>
84
				<true/>
85
			</dict>
86
			<key>value</key>
87
			<array/>
88
		</dict>
89
		<key>MCXDockSpecialFolders-Raw</key>
90
		<dict>
91
			<key>state</key>
92
			<string>always</string>
93
			<key>upk</key>
94
			<dict>
95
				<key>mcx_input_key_names</key>
96
				<array>
97
					<string>MCXDockSpecialFolders-Raw</string>
98
				</array>
99
				<key>mcx_output_key_name</key>
100
				<string>MCXDockSpecialFolders</string>
101
				<key>mcx_remove_duplicates</key>
102
				<true/>
103
			</dict>
104
			<key>value</key>
105
			<array/>
106
		</dict>
107
		<key>contents-immutable</key>
108
		<dict>
109
			<key>state</key>
110
			<string>always</string>
111
			<key>value</key>
112
			<false/>
113
		</dict>
114
		<key>static-only</key>
115
		<dict>
116
			<key>state</key>
117
			<string>always</string>
118
			<key>value</key>
119
			<false/>
120
		</dict>
121
	</dict>
14
    <key>com.apple.dock</key>
15
    <dict>
16
        <key>AppItems-Raw</key>
17
        <dict>
18
            <key>state</key>
19
            <string>always</string>
20
            <key>upk</key>
21
            <dict>
22
                <key>mcx_input_key_names</key>
23
                <array>
24
                    <string>AppItems-Raw</string>
25
                </array>
26
                <key>mcx_output_key_name</key>
27
                <string>static-apps</string>
28
                <key>mcx_remove_duplicates</key>
29
                <true/>
30
            </dict>
31
            <key>value</key>
32
            <array>
33
                <dict>
34
                    <key>mcx_typehint</key>
35
                    <integer>1</integer>
36
                    <key>tile-data</key>
37
                    <dict>
38
                        <key>file-data</key>
39
                        <dict>
40
                            <key>_CFURLString</key>
41
                            <string>/Applications/Mail.app</string>
42
                            <key>_CFURLStringType</key>
43
                            <integer>0</integer>
44
                        </dict>
45
                        <key>file-label</key>
46
                        <string>Mail</string>
47
                    </dict>
48
                    <key>tile-type</key>
49
                    <string>file-tile</string>
50
                </dict>
51
                <dict>
52
                    <key>mcx_typehint</key>
53
                    <integer>1</integer>
54
                    <key>tile-data</key>
55
                    <dict>
56
                        <key>file-data</key>
57
                        <dict>
58
                            <key>_CFURLString</key>
59
                            <string>/Applications/Safari.app</string>
60
                            <key>_CFURLStringType</key>
61
                            <integer>0</integer>
62
                        </dict>
63
                        <key>file-label</key>
64
                        <string>Safari</string>
65
                    </dict>
66
                    <key>tile-type</key>
67
                    <string>file-tile</string>
68
                </dict>
69
            </array>
70
        </dict>
71
        <key>DocItems-Raw</key>
72
        <dict>
73
            <key>state</key>
74
            <string>always</string>
75
            <key>upk</key>
76
            <dict>
77
                <key>mcx_input_key_names</key>
78
                <array>
79
                    <string>DocItems-Raw</string>
80
                </array>
81
                <key>mcx_output_key_name</key>
82
                <string>static-others</string>
83
                <key>mcx_remove_duplicates</key>
84
                <true/>
85
            </dict>
86
            <key>value</key>
87
            <array/>
88
        </dict>
89
        <key>MCXDockSpecialFolders-Raw</key>
90
        <dict>
91
            <key>state</key>
92
            <string>always</string>
93
            <key>upk</key>
94
            <dict>
95
                <key>mcx_input_key_names</key>
96
                <array>
97
                    <string>MCXDockSpecialFolders-Raw</string>
98
                </array>
99
                <key>mcx_output_key_name</key>
100
                <string>MCXDockSpecialFolders</string>
101
                <key>mcx_remove_duplicates</key>
102
                <true/>
103
            </dict>
104
            <key>value</key>
105
            <array/>
106
        </dict>
107
        <key>contents-immutable</key>
108
        <dict>
109
            <key>state</key>
110
            <string>always</string>
111
            <key>value</key>
112
            <false/>
113
        </dict>
114
        <key>static-only</key>
115
        <dict>
116
            <key>state</key>
117
            <string>always</string>
118
            <key>value</key>
... This diff was truncated because it exceeds the maximum size that can be displayed.