[PATCH 3/5] upstart: add upstart as a possible activation type
Scott James Remnant
scott at netsplit.com
Wed Dec 22 07:27:05 PST 2010
Add upstart as a possible value for the enum and the command-line
option.
---
bus/bus.h | 3 ++-
bus/main.c | 4 +++-
doc/dbus-daemon.1.in | 4 ++++
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/bus/bus.h b/bus/bus.h
index b4ea9e6..2bd5a04 100644
--- a/bus/bus.h
+++ b/bus/bus.h
@@ -74,7 +74,8 @@ typedef enum
typedef enum
{
ACTIVATION_DEFAULT,
- ACTIVATION_SYSTEMD
+ ACTIVATION_SYSTEMD,
+ ACTIVATION_UPSTART
} ActivationType;
BusContext* bus_context_new (const DBusString *config_file,
diff --git a/bus/main.c b/bus/main.c
index 601d4b4..ebf6d42 100644
--- a/bus/main.c
+++ b/bus/main.c
@@ -75,7 +75,7 @@ signal_handler (int sig)
static void
usage (void)
{
- fprintf (stderr, DBUS_DAEMON_NAME " [--version] [--session] [--system] [--config-file=FILE] [--print-address[=DESCRIPTOR]] [--print-pid[=DESCRIPTOR]] [--fork] [--nofork] [--introspect] [--address=ADDRESS] [--activation=systemd]\n");
+ fprintf (stderr, DBUS_DAEMON_NAME " [--version] [--session] [--system] [--config-file=FILE] [--print-address[=DESCRIPTOR]] [--print-pid[=DESCRIPTOR]] [--fork] [--nofork] [--introspect] [--address=ADDRESS] [--activation=systemd|upstart]\n");
exit (1);
}
@@ -323,6 +323,8 @@ main (int argc, char **argv)
if (strcmp (activation, "systemd") == 0)
activation_type = ACTIVATION_SYSTEMD;
+ else if (strcmp (activation, "upstart") == 0)
+ activation_type = ACTIVATION_UPSTART;
else
{
fprintf (stderr, "Unknown activation type: %s.\n", activation);
diff --git a/doc/dbus-daemon.1.in b/doc/dbus-daemon.1.in
index 9aaa316..cc1019e 100644
--- a/doc/dbus-daemon.1.in
+++ b/doc/dbus-daemon.1.in
@@ -94,6 +94,10 @@ configured in the configuration file.
.I "--activation=systemd"
Enable systemd-style service activation. Only useful in conjunction
with the systemd system and session manager on Linux.
+.TP
+.I "--activation=upstart"
+Enable upstart-style service activation. Only useful in conjunction
+with the Upstart init daemon on Linux.
.SH CONFIGURATION FILE
--
1.7.1
More information about the dbus
mailing list