mpt has funny ears
authorPeter Palfrader <peter@palfrader.org>
Sun, 28 Feb 2010 20:06:44 +0000 (21:06 +0100)
committerPeter Palfrader <peter@palfrader.org>
Sun, 28 Feb 2010 20:06:44 +0000 (21:06 +0100)
manifests/site.pp
modules/raid-mpt/manifest/init.pp [new file with mode: 0644]

index 7cfd069..00f3d50 100644 (file)
@@ -43,7 +43,7 @@ node default {
         "true":    { package { acpid: ensure => installed } }
     }
     case $mptraid {
-        "true":    { package { mpt-status: ensure => installed } }
+        "true":    { include raid-mpt }
     }
 
     case $mta {
diff --git a/modules/raid-mpt/manifest/init.pp b/modules/raid-mpt/manifest/init.pp
new file mode 100644 (file)
index 0000000..c5cdaf7
--- /dev/null
@@ -0,0 +1,22 @@
+class raid-mpt {
+    package {
+        mtp-status: ensure => installed;
+    }
+
+    file {
+        "/etc/default/mpt-statusd":
+            content =>  "# This file is under puppet control" +
+                        "RUN_DAEMON=no",
+            notify  => Exec["mpt-statusd-stop"],
+            ;
+    }
+    exec {
+        "mpt-statusd-stop":
+            command: 'pidfile=/var/run/mpt-statusd.pid; ! [ -e "$pidfile" ] || /sbin/start-stop-daemon --oknodo --stop --quiet --pidfile "$pidfile"; rm -f "$pidfile"'
+            refreshonly => true,
+            ;
+    }
+}
+# vim:set et:
+# vim:set ts=4:
+# vim:set shiftwidth=4: