summaryrefslogtreecommitdiffstats
path: root/examples/code
diff options
context:
space:
mode:
Diffstat (limited to 'examples/code')
-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
+}