From efe9a833c43358e23ae252456a07b37cc9904a0a Mon Sep 17 00:00:00 2001 From: mccune Date: Tue, 3 Apr 2007 15:51:18 +0000 Subject: 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 --- examples/code/mac_automount.pp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 examples/code/mac_automount.pp (limited to 'examples/code') 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 +# +# 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 +} -- cgit