From 8362fdd76eab38a42f43401627990cbf3b138750 Mon Sep 17 00:00:00 2001
From: "A. Karl Kornel" <akkornel@stanford.edu>
Date: Wed, 17 Aug 2016 10:27:09 -0700
Subject: [PATCH] os::ubuntu: Changes to daemontools

Only start daemontools in ubuntu 14.10 and below.  Also make sure daemontools is brough in before we need it.
---
 manifests/os/ubuntu.pp | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/manifests/os/ubuntu.pp b/manifests/os/ubuntu.pp
index 108f774..79760b8 100644
--- a/manifests/os/ubuntu.pp
+++ b/manifests/os/ubuntu.pp
@@ -8,14 +8,20 @@ class base::os::ubuntu inherits base::os::debian {
       source => 'puppet:///modules/base/os/etc/apt/apt.conf.d/06apt';
     '/etc/bash.bashrc':
       source => 'puppet:///modules/base/os/etc/bash.bashrc';
-    '/etc/init/supervise.conf':
-      source => 'puppet:///modules/base/os/etc/init/supervise.conf',
-      notify => Exec['start supervise'];
   }
 
-  # Triggered on Ubuntu to start the supervise process.
-  exec { 'start supervise':
-    command     => '/sbin/start supervise',
-    refreshonly => true,
+  # Triggered on Ubuntu to start the supervise process.  Only on 14.10 and below.
+  if ($::lsbmajdistrelease < 15) {
+    include base::daemontools
+    file {
+      '/etc/init/supervise.conf':
+        source => 'puppet:///modules/base/os/etc/init/supervise.conf',
+        notify => Exec['start supervise'],
+    }
+    exec { 'start supervise':
+      command     => '/sbin/start supervise',
+      refreshonly => true,
+      require     => Package['daemontools'],
+    }
   }
 }
-- 
GitLab