init_is_upstart() is to be used by init scripts of upstart-aware packages to
render the init script inert when upstart is present.
Signed-off-by: Didier Raboud <odyx@debian.org>
Closes: #661109
Git-Dch: Full
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
+ - init_is_upstart
+
+ If the currently running init daemon is upstart, return zero; if the
+ calling init script belongs to a package which also provides a native
+ upstart job, it should generally exit non-zero in this case.
+
+ init_is_upstart is available from lsb-base 4.1+Debian2+.
+
To use these functions, source /lib/lsb/init-functions at the
beginning of your (Bourne sh or compatible) init script.
sed -n "/$LSB_S/,/$LSB_E/ s/# $2: \(.*\)/\1/p" $1
}
+# If the currently running init daemon is upstart, return zero; if the
+# calling init script belongs to a package which also provides a native
+# upstart job, it should generally exit non-zero in this case.
+init_is_upstart()
+{
+ if which initctl && initctl version | grep -q upstart
+ then
+ return 0
+ fi
+ return 1
+}
+
# int log_begin_message (char *message)
log_begin_msg () {
log_begin_msg_pre "$@"