From 46275e646b84c1f6bad2673fc3d118fb22ec24bf Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 28 Feb 2010 21:06:44 +0100 Subject: [PATCH] mpt has funny ears --- manifests/site.pp | 2 +- modules/raid-mpt/manifest/init.pp | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 modules/raid-mpt/manifest/init.pp diff --git a/manifests/site.pp b/manifests/site.pp index 7cfd06950..00f3d50c5 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -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 index 000000000..c5cdaf793 --- /dev/null +++ b/modules/raid-mpt/manifest/init.pp @@ -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: -- 2.20.1