summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-sourcing-without-test.init
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-sourcing-without-test.init')
-rw-r--r--t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-sourcing-without-test.init52
1 files changed, 52 insertions, 0 deletions
diff --git a/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-sourcing-without-test.init b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-sourcing-without-test.init
new file mode 100644
index 0000000..7046ed9
--- /dev/null
+++ b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-sourcing-without-test.init
@@ -0,0 +1,52 @@
+#!/bin/sh -e
+
+### BEGIN INIT INFO
+# Provides: init.d-general-sourcing-without-test
+# Required-Start: $remote_fs
+# Required-Stop: $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start daemon at boot time
+# Description: Enable service provided by daemon.
+### END INIT INFO
+
+echo start stop reload restart force-reload status
+
+. /lib/lsb/init-functions
+
+. /etc/default/rcS
+
+[ ! -f /etc/default/foo ] || . /etc/default/foo
+
+[ -f /etc/default/bar ] && . /etc/default/bar
+
+if [ -e /etc/default/locale ]; then
+ . /etc/default/locale
+fi
+
+if [ -f /etc/default/moo ]; then
+ . /etc/default/moo
+fi
+
+if [ -r /etc/default/tmpfs ]; then
+ . /etc/default/tmpfs
+fi
+
+PACKAGE=moo
+[ -f /etc/default/$PACKAGE ] && . /etc/default/$PACKAGE
+
+if [ -f /etc/default/$PACKAGE ]; then
+ . /etc/default/$PACKAGE
+fi
+
+if test -f /etc/default/$PACKAGE; then
+ . /etc/default/$PACKAGE
+fi
+
+# This is not sourcing without a test and shouldn't produce an error.
+if [ ! -f /etc/default/$PACKAGE ] ; then
+ # do something else
+ :
+else
+ . /etc/default/$PACKAGE
+fi