From 5ca1bd0f5403cdcb341289183e824a3ed93eb224 Mon Sep 17 00:00:00 2001
From: Stephen Gran <steve@lobefin.net>
Date: Wed, 20 Oct 2010 17:13:31 +0100
Subject: [PATCH] First stab at managing rc.local

Signed-off-by: Stephen Gran <steve@lobefin.net>
---
 modules/debian-org/files/rc.local    | 5 +++++
 modules/debian-org/manifests/init.pp | 8 ++++++++
 2 files changed, 13 insertions(+)
 create mode 100755 modules/debian-org/files/rc.local

diff --git a/modules/debian-org/files/rc.local b/modules/debian-org/files/rc.local
new file mode 100755
index 00000000..4d8738d4
--- /dev/null
+++ b/modules/debian-org/files/rc.local
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+if [ -e /proc/sys/kernel/modules_disabled ]; then
+	echo 1 > /proc/sys/kernel/modules_disabled || true
+fi
diff --git a/modules/debian-org/manifests/init.pp b/modules/debian-org/manifests/init.pp
index 7af2230d..78693b59 100644
--- a/modules/debian-org/manifests/init.pp
+++ b/modules/debian-org/manifests/init.pp
@@ -92,6 +92,11 @@ class debian-org {
             require => Package["libpam-pwdfile"],
             source => "puppet:///files/etc/pam.d/common-session",
             ;
+        "/etc/rc.local":
+            mode   => 0775,
+            source => "puppet:///modules/debian.org/rc.local",
+            notify => Exec["rc.local start"],
+            ;
     }
     case $hostname {
         handel: {
@@ -129,6 +134,9 @@ class debian-org {
         "puppetmaster restart":
             path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
             refreshonly => true;
+        "rc.local start":
+            path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
+            refreshonly => true;
         "procps restart":
             path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
             refreshonly => true;
-- 
2.39.5