summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authormccune <mccune@980ebf18-57e1-0310-9a29-db15c13687c0>2007-04-03 15:51:18 +0000
committermccune <mccune@980ebf18-57e1-0310-9a29-db15c13687c0>2007-04-03 15:51:18 +0000
commitefe9a833c43358e23ae252456a07b37cc9904a0a (patch)
tree2597028c9ecb1b1677a63d807691b1a2c32498d8 /examples
parent8ab272265d30ea01322943c688e815ad772a571a (diff)
downloadpuppet-efe9a833c43358e23ae252456a07b37cc9904a0a.tar.gz
puppet-efe9a833c43358e23ae252456a07b37cc9904a0a.tar.xz
puppet-efe9a833c43358e23ae252456a07b37cc9904a0a.zip
Fix for #565: Final merge of changes from source:branches/execute-refactor into source:trunk
Generated with svn merge -r 2378:HEAD https://reductivelabs.com/svn/puppet/branches/execute-refactor trunk CHANGES: - Puppet::Util#execute now takes hash key/value pairs as arguments after the command array. - Processes executed from the base service provider are now silenced. That is, their standard input, output, and error pipes are all directed to /dev/null. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2385 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'examples')
-rw-r--r--examples/code/mac_automount.pp16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/code/mac_automount.pp b/examples/code/mac_automount.pp
new file mode 100644
index 000000000..bab0136fc
--- /dev/null
+++ b/examples/code/mac_automount.pp
@@ -0,0 +1,16 @@
+#!/usr/bin/env puppet
+# Jeff McCune <mccune@math.ohio-state.edu>
+#
+# Apple's Automounter spawns a child that sends the parent
+# a SIGTERM. This makes it *very* difficult to figure out
+# if the process started correctly or not.
+#
+
+service {"automount-test":
+ provider => base,
+ hasrestart => false,
+ pattern => '/tmp/hometest',
+ start => "/usr/sbin/automount -m /tmp/home /dev/null -mnt /tmp/hometest",
+ stop => "ps auxww | grep '/tmp/hometest' | grep -v grep | awk '{print \$2}' | xargs kill",
+ ensure => running
+}