From ee91627ee48288b49403d1453fccf90f371e2a61 Mon Sep 17 00:00:00 2001 From: Emile Cantin Date: Wed, 18 Apr 2012 10:12:01 -0400 Subject: [PATCH] Added a bit of error handling to the template --- data/export/initscript/master.erb | 4 ++-- spec/resources/export/initscript/app | 4 ++-- spec/resources/export/initscript/app-concurrency | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/data/export/initscript/master.erb b/data/export/initscript/master.erb index 3b18e5c..bdd37d4 100644 --- a/data/export/initscript/master.erb +++ b/data/export/initscript/master.erb @@ -25,12 +25,12 @@ SCRIPTNAME=/etc/init.d/$NAME [ -r /etc/default/$NAME ] && . /etc/default/$NAME # Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh +[ -r /lib/init/vars.sh ] && . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.2-14) to ensure that this file is present # and status_of_proc is working. -. /lib/lsb/init-functions +[ -r /lib/lsb/init-functions ] &&. /lib/lsb/init-functions # # Function that starts the daemon/service diff --git a/spec/resources/export/initscript/app b/spec/resources/export/initscript/app index ec3a131..205a8d8 100644 --- a/spec/resources/export/initscript/app +++ b/spec/resources/export/initscript/app @@ -25,12 +25,12 @@ SCRIPTNAME=/etc/init.d/$NAME [ -r /etc/default/$NAME ] && . /etc/default/$NAME # Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh +[ -r /lib/init/vars.sh ] && . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.2-14) to ensure that this file is present # and status_of_proc is working. -. /lib/lsb/init-functions +[ -r /lib/lsb/init-functions ] &&. /lib/lsb/init-functions # # Function that starts the daemon/service diff --git a/spec/resources/export/initscript/app-concurrency b/spec/resources/export/initscript/app-concurrency index 19361a9..80f00be 100644 --- a/spec/resources/export/initscript/app-concurrency +++ b/spec/resources/export/initscript/app-concurrency @@ -25,12 +25,12 @@ SCRIPTNAME=/etc/init.d/$NAME [ -r /etc/default/$NAME ] && . /etc/default/$NAME # Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh +[ -r /lib/init/vars.sh ] && . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.2-14) to ensure that this file is present # and status_of_proc is working. -. /lib/lsb/init-functions +[ -r /lib/lsb/init-functions ] &&. /lib/lsb/init-functions # # Function that starts the daemon/service