Merge lp:~jamesodhunt/upstart/upstream-change-startup-event into lp:upstart

Proposed by James Hunt
Status: Merged
Merged at revision: 1287
Proposed branch: lp:~jamesodhunt/upstart/upstream-change-startup-event
Merge into: lp:upstart
Diff against target: 1420 lines (+523/-256)
19 files modified
ChangeLog (+34/-0)
configure.ac (+1/-1)
init/conf.c (+0/-1)
init/control.c (+33/-7)
init/control.h (+15/-1)
init/environ.c (+0/-1)
init/environ.h (+0/-1)
init/job_process.c (+0/-1)
init/job_process.h (+0/-1)
init/main.c (+229/-136)
init/man/init.8 (+23/-2)
init/paths.h (+16/-2)
init/tests/test_conf.c (+0/-1)
init/tests/test_control.c (+0/-1)
init/tests/test_environ.c (+0/-1)
init/tests/test_job_class.c (+0/-1)
init/tests/test_job_process.c (+0/-1)
po/upstart.pot (+172/-96)
util/reboot.c (+0/-1)
To merge this branch: bzr merge lp:~jamesodhunt/upstart/upstream-change-startup-event
Reviewer Review Type Date Requested Status
Upstart Developers Pending
Review via email: mp+63347@code.launchpad.net

Description of the change

Add ability to suppress initial event and/or change its name.

* init/main.c: New command-line options: "--no-startup-event" and
  "--startup-event". If "--no-startup-event" specified, log message as a
  debug aid.
* init/man/init.8: Documentation for new command-line options:
  "--no-startup-event" and "--startup-event".

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2011-05-12 20:42:28 +0000
3+++ ChangeLog 2011-06-03 09:26:24 +0000
4@@ -1,3 +1,37 @@
5+2011-05-31 James Hunt <james.hunt@ubuntu.com>
6+
7+ Add command-line option to use D-Bus session bus (for testing).
8+
9+ * init/control.c:
10+ - Added new boolean use_session_bus.
11+ - Updated comments.
12+ - control_handle_bus_type(): New function to allow selection of
13+ session bus via env var "UPSTART_USE_SESSION_BUS".
14+ Also logs use of session bus if use_session_bus set.
15+ - control_bus_open(): Now connects to either D-Bus system bus or session bus.
16+ * init/control.h: New define for USE_SESSION_BUS_ENV.
17+ * init/main.c: Addition of "--session" command-line option.
18+ * init/man/init.8: Update for new "--session" command-line option.
19+
20+ * Corrected copyright notices.
21+
22+ Add option to allow alternate location for job config files.
23+
24+ * init/main.c:
25+ - Added "--confdir <dir>" command-line option.
26+ - handle_confdir(): New function to select alternate confdir using env
27+ var "UPSTART_CONFDIR" or command-line option (for testing).
28+ * init/paths.h: Added define for CONFDIR_ENV.
29+ * init/man/init.8: Update for new "--confdir" command-line option.
30+
31+ Add ability to suppress initial event and/or change its name.
32+
33+ * init/main.c: New command-line options: "--no-startup-event" and
34+ "--startup-event". If "--no-startup-event" specified, log message as a
35+ debug aid.
36+ * init/man/init.8: Documentation for new command-line options:
37+ "--no-startup-event" and "--startup-event".
38+
39 2011-05-12 Marc - A. Dahlhaus <mad@wol.de>
40
41 * init/job_class.h (JobClass): Add kill signal member
42
43=== modified file 'configure.ac'
44--- configure.ac 2011-03-22 17:53:17 +0000
45+++ configure.ac 2011-06-03 09:26:24 +0000
46@@ -2,7 +2,7 @@
47
48 AC_PREREQ(2.61)
49 AC_INIT([upstart], [1.3], [upstart-devel@lists.ubuntu.com])
50-NIH_COPYRIGHT([[Copyright © 2011 Scott James Remnant, Google Inc., Canonical Ltd.]])
51+NIH_COPYRIGHT([[Copyright © 2011 Scott James Remnant, Canonical Ltd.]])
52 AC_CONFIG_SRCDIR([init/main.c])
53 AC_CONFIG_MACRO_DIR([m4])
54
55
56=== modified file 'init/conf.c'
57--- init/conf.c 2011-03-15 18:44:09 +0000
58+++ init/conf.c 2011-06-03 09:26:24 +0000
59@@ -2,7 +2,6 @@
60 *
61 * conf.c - configuration management
62 *
63- * Copyright © 2011 Google Inc.
64 * Copyright © 2009 Canonical Ltd.
65 * Author: Scott James Remnant <scott@netsplit.com>.
66 *
67
68=== modified file 'init/control.c'
69--- init/control.c 2009-07-11 11:47:12 +0000
70+++ init/control.c 2011-06-03 09:26:24 +0000
71@@ -2,7 +2,7 @@
72 *
73 * control.c - D-Bus connections, objects and methods
74 *
75- * Copyright © 2009 Canonical Ltd.
76+ * Copyright © 2009-2011 Canonical Ltd.
77 * Author: Scott James Remnant <scott@netsplit.com>.
78 *
79 * This program is free software; you can redistribute it and/or modify
80@@ -54,12 +54,19 @@
81
82 #include "com.ubuntu.Upstart.h"
83
84-
85 /* Prototypes for static functions */
86 static int control_server_connect (DBusServer *server, DBusConnection *conn);
87 static void control_disconnected (DBusConnection *conn);
88 static void control_register_all (DBusConnection *conn);
89
90+/**
91+ * use_session_bus:
92+ *
93+ * If TRUE, connect to the D-Bus sessio bus rather than the system bus.
94+ *
95+ * Used for testing.
96+ **/
97+int use_session_bus = FALSE;
98
99 /**
100 * control_server_address:
101@@ -78,7 +85,7 @@
102 /**
103 * control_bus:
104 *
105- * Open connection to D-Bus system bus. The connection may be opened with
106+ * Open connection to a D-Bus bus. The connection may be opened with
107 * control_bus_open() and if lost will become NULL.
108 **/
109 DBusConnection *control_bus = NULL;
110@@ -86,7 +93,7 @@
111 /**
112 * control_conns:
113 *
114- * Open control connections, including the connection to the D-Bus system
115+ * Open control connections, including the connection to a D-Bus
116 * bus and any private client connections.
117 **/
118 NihList *control_conns = NULL;
119@@ -190,8 +197,9 @@
120 /**
121 * control_bus_open:
122 *
123- * Open a connection to the D-Bus system bus and store it in the control_bus
124- * global. The connection is handled automatically in the main loop.
125+ * Open a connection to the appropriate D-Bus bus and store it in the
126+ * control_bus global. The connection is handled automatically
127+ * in the main loop.
128 *
129 * Returns: zero on success, negative value on raised error.
130 **/
131@@ -207,10 +215,13 @@
132
133 control_init ();
134
135+ control_handle_bus_type ();
136+
137 /* Connect to the D-Bus System Bus and hook everything up into
138 * our own main loop automatically.
139 */
140- conn = nih_dbus_bus (DBUS_BUS_SYSTEM, control_disconnected);
141+ conn = nih_dbus_bus (use_session_bus ? DBUS_BUS_SESSION : DBUS_BUS_SYSTEM,
142+ control_disconnected);
143 if (! conn)
144 return -1;
145
146@@ -669,3 +680,18 @@
147
148 return 0;
149 }
150+
151+/**
152+ * control_handle_bus_type:
153+ *
154+ * Determine D-Bus bus type to connect to.
155+ **/
156+void
157+control_handle_bus_type (void)
158+{
159+ if (getenv (USE_SESSION_BUS_ENV))
160+ use_session_bus = TRUE;
161+
162+ if (use_session_bus)
163+ nih_debug ("Using session bus");
164+}
165
166=== modified file 'init/control.h'
167--- init/control.h 2009-07-09 08:36:52 +0000
168+++ init/control.h 2011-06-03 09:26:24 +0000
169@@ -1,6 +1,6 @@
170 /* upstart
171 *
172- * Copyright © 2009 Canonical Ltd.
173+ * Copyright © 2009-2011 Canonical Ltd.
174 * Author: Scott James Remnant <scott@netsplit.com>.
175 *
176 * This program is free software; you can redistribute it and/or modify
177@@ -27,6 +27,18 @@
178 #include <nih-dbus/dbus_connection.h>
179 #include <nih-dbus/dbus_message.h>
180
181+/**
182+ * USE_SESSION_BUS_ENV:
183+ *
184+ * If this environment variable is set to any value, connect to
185+ * D-Bus session bus rather than the system bus.
186+ *
187+ * Used for testing.
188+ **/
189+#ifndef USE_SESSION_BUS_ENV
190+#define USE_SESSION_BUS_ENV "UPSTART_USE_SESSION_BUS"
191+#endif
192+
193
194 NIH_BEGIN_EXTERN
195
196@@ -72,6 +84,8 @@
197 const char *log_priority)
198 __attribute__ ((warn_unused_result));
199
200+void control_handle_bus_type (void);
201+
202 NIH_END_EXTERN
203
204 #endif /* INIT_CONTROL_H */
205
206=== modified file 'init/environ.c'
207--- init/environ.c 2011-03-16 22:42:48 +0000
208+++ init/environ.c 2011-06-03 09:26:24 +0000
209@@ -2,7 +2,6 @@
210 *
211 * environ.c - environment table utilities
212 *
213- * Copyright © 2011 Google Inc.
214 * Copyright © 2009 Canonical Ltd.
215 * Author: Scott James Remnant <scott@netsplit.com>.
216 *
217
218=== modified file 'init/environ.h'
219--- init/environ.h 2011-03-16 22:42:48 +0000
220+++ init/environ.h 2011-06-03 09:26:24 +0000
221@@ -1,6 +1,5 @@
222 /* upstart
223 *
224- * Copyright © 2011 Google Inc.
225 * Copyright © 2009 Canonical Ltd.
226 * Author: Scott James Remnant <scott@netsplit.com>.
227 *
228
229=== modified file 'init/job_process.c'
230--- init/job_process.c 2011-05-12 20:42:28 +0000
231+++ init/job_process.c 2011-06-03 09:26:24 +0000
232@@ -2,7 +2,6 @@
233 *
234 * job_process.c - job process handling
235 *
236- * Copyright © 2011 Google Inc.
237 * Copyright © 2011 Canonical Ltd.
238 * Author: Scott James Remnant <scott@netsplit.com>.
239 *
240
241=== modified file 'init/job_process.h'
242--- init/job_process.h 2011-05-12 19:21:16 +0000
243+++ init/job_process.h 2011-06-03 09:26:24 +0000
244@@ -1,6 +1,5 @@
245 /* upstart
246 *
247- * Copyright © 2011 Google Inc.
248 * Copyright © 2009 Canonical Ltd.
249 * Author: Scott James Remnant <scott@netsplit.com>.
250 *
251
252=== modified file 'init/main.c'
253--- init/main.c 2011-03-16 22:54:56 +0000
254+++ init/main.c 2011-06-03 09:26:24 +0000
255@@ -1,7 +1,6 @@
256 /* upstart
257 *
258- * Copyright © 2011 Google Inc.
259- * Copyright © 2010 Canonical Ltd.
260+ * Copyright © 2009-2011 Canonical Ltd.
261 * Author: Scott James Remnant <scott@netsplit.com>.
262 *
263 * This program is free software; you can redistribute it and/or modify
264@@ -71,6 +70,8 @@
265 static void usr1_handler (void *data, NihSignal *signal);
266 #endif /* DEBUG */
267
268+static void handle_confdir (void);
269+
270
271 /**
272 * argv0:
273@@ -90,13 +91,49 @@
274
275
276 /**
277+ * conf_dir:
278+ *
279+ * Full path to job configuration file directory.
280+ *
281+ **/
282+static char *conf_dir = NULL;
283+
284+/**
285+ * initial_event:
286+ *
287+ * Alternate event to emit at startup (rather than STARTUP_EVENT).
288+ **/
289+static char *initial_event = NULL;
290+
291+/**
292+ * disable_startup_event:
293+ *
294+ * If TRUE, do not emit a startup event.
295+ **/
296+static int disable_startup_event = FALSE;
297+
298+extern int use_session_bus;
299+
300+/**
301 * options:
302 *
303 * Command-line options we accept.
304 **/
305 static NihOption options[] = {
306+ { 0, "confdir", N_("specify alternative directory to load configuration files from"),
307+ NULL, "DIR", &conf_dir, NULL },
308+
309+ { 0, "no-startup-event", N_("do not emit any startup event (for testing)"),
310+ NULL, NULL, &disable_startup_event, NULL },
311+
312 { 0, "restart", NULL, NULL, NULL, &restart, NULL },
313
314+ { 0, "session", N_("use D-Bus session bus rather than system bus (for testing)"),
315+ NULL, NULL, &use_session_bus, NULL },
316+
317+ { 0, "startup-event", N_("specify an alternative initial event (for testing)"),
318+ NULL, "NAME", &initial_event, NULL },
319+
320 /* Ignore invalid options */
321 { '-', "--", NULL, NULL, NULL, NULL, NULL },
322
323@@ -124,94 +161,105 @@
324 if (! args)
325 exit (1);
326
327+ handle_confdir ();
328+ control_handle_bus_type ();
329+
330 #ifndef DEBUG
331- /* Check we're root */
332- if (getuid ()) {
333- nih_fatal (_("Need to be root"));
334- exit (1);
335- }
336-
337- /* Check we're process #1 */
338- if (getpid () > 1) {
339- execv (TELINIT, argv);
340- /* Ignore failure, probably just that telinit doesn't exist */
341-
342- nih_fatal (_("Not being executed as init"));
343- exit (1);
344- }
345-
346- /* Clear our arguments from the command-line, so that we show up in
347- * ps or top output as /sbin/init, with no extra flags.
348- *
349- * This is a very Linux-specific trick; by deleting the NULL
350- * terminator at the end of the last argument, we fool the kernel
351- * into believing we used a setproctitle()-a-like to extend the
352- * argument space into the environment space, and thus make it use
353- * strlen() instead of its own assumed length. In fact, we've done
354- * the exact opposite, and shrunk the command line length to just that
355- * of whatever is in argv[0].
356- *
357- * If we don't do this, and just write \0 over the rest of argv, for
358- * example; the command-line length still includes those \0s, and ps
359- * will show whitespace in their place.
360- */
361- if (argc > 1) {
362- char *arg_end;
363-
364- arg_end = argv[argc-1] + strlen (argv[argc-1]);
365- *arg_end = ' ';
366- }
367-
368-
369- /* Become the leader of a new session and process group, shedding
370- * any controlling tty (which we shouldn't have had anyway - but
371- * you never know what initramfs did).
372- */
373- setsid ();
374-
375- /* Set the standard file descriptors to the ordinary console device,
376- * resetting it to sane defaults unless we're inheriting from another
377- * init process which we know left it in a sane state.
378- */
379- if (system_setup_console (CONSOLE_OUTPUT, (! restart)) < 0)
380- nih_free (nih_error_get ());
381-
382- /* Set the PATH environment variable */
383- setenv ("PATH", PATH, TRUE);
384-
385- /* Switch to the root directory in case we were started from some
386- * strange place, or worse, some directory in the initramfs that's
387- * going to go away soon.
388- */
389- if (chdir ("/"))
390- nih_warn ("%s: %s", _("Unable to set root directory"),
391- strerror (errno));
392-
393- /* Mount the /proc and /sys filesystems, which are pretty much
394- * essential for any Linux system; not to mention used by
395- * ourselves.
396- */
397- if (system_mount ("proc", "/proc") < 0) {
398- NihError *err;
399-
400- err = nih_error_get ();
401- nih_warn ("%s: %s", _("Unable to mount /proc filesystem"),
402- err->message);
403- nih_free (err);
404- }
405-
406- if (system_mount ("sysfs", "/sys") < 0) {
407- NihError *err;
408-
409- err = nih_error_get ();
410- nih_warn ("%s: %s", _("Unable to mount /sys filesystem"),
411- err->message);
412- nih_free (err);
413- }
414+ if (use_session_bus == FALSE) {
415+
416+ /* Check we're root */
417+ if (getuid ()) {
418+ nih_fatal (_("Need to be root"));
419+ exit (1);
420+ }
421+
422+ /* Check we're process #1 */
423+ if (getpid () > 1) {
424+ execv (TELINIT, argv);
425+ /* Ignore failure, probably just that telinit doesn't exist */
426+
427+ nih_fatal (_("Not being executed as init"));
428+ exit (1);
429+ }
430+
431+ /* Clear our arguments from the command-line, so that we show up in
432+ * ps or top output as /sbin/init, with no extra flags.
433+ *
434+ * This is a very Linux-specific trick; by deleting the NULL
435+ * terminator at the end of the last argument, we fool the kernel
436+ * into believing we used a setproctitle()-a-like to extend the
437+ * argument space into the environment space, and thus make it use
438+ * strlen() instead of its own assumed length. In fact, we've done
439+ * the exact opposite, and shrunk the command line length to just that
440+ * of whatever is in argv[0].
441+ *
442+ * If we don't do this, and just write \0 over the rest of argv, for
443+ * example; the command-line length still includes those \0s, and ps
444+ * will show whitespace in their place.
445+ */
446+ if (argc > 1) {
447+ char *arg_end;
448+
449+ arg_end = argv[argc-1] + strlen (argv[argc-1]);
450+ *arg_end = ' ';
451+ }
452+
453+
454+ /* Become the leader of a new session and process group, shedding
455+ * any controlling tty (which we shouldn't have had anyway - but
456+ * you never know what initramfs did).
457+ */
458+ setsid ();
459+
460+ /* Set the standard file descriptors to the ordinary console device,
461+ * resetting it to sane defaults unless we're inheriting from another
462+ * init process which we know left it in a sane state.
463+ */
464+ if (system_setup_console (CONSOLE_OUTPUT, (! restart)) < 0)
465+ nih_free (nih_error_get ());
466+
467+ /* Set the PATH environment variable */
468+ setenv ("PATH", PATH, TRUE);
469+
470+ /* Switch to the root directory in case we were started from some
471+ * strange place, or worse, some directory in the initramfs that's
472+ * going to go away soon.
473+ */
474+ if (chdir ("/"))
475+ nih_warn ("%s: %s", _("Unable to set root directory"),
476+ strerror (errno));
477+
478+ /* Mount the /proc and /sys filesystems, which are pretty much
479+ * essential for any Linux system; not to mention used by
480+ * ourselves.
481+ */
482+ if (system_mount ("proc", "/proc") < 0) {
483+ NihError *err;
484+
485+ err = nih_error_get ();
486+ nih_warn ("%s: %s", _("Unable to mount /proc filesystem"),
487+ err->message);
488+ nih_free (err);
489+ }
490+
491+ if (system_mount ("sysfs", "/sys") < 0) {
492+ NihError *err;
493+
494+ err = nih_error_get ();
495+ nih_warn ("%s: %s", _("Unable to mount /sys filesystem"),
496+ err->message);
497+ nih_free (err);
498+ }
499+ } else {
500+ nih_log_set_priority (NIH_LOG_DEBUG);
501+ nih_debug ("Running with UID %d as PID %d (PPID %d)",
502+ (int)getuid (), (int)getpid (), (int)getppid ());
503+ }
504+
505 #else /* DEBUG */
506 nih_log_set_priority (NIH_LOG_DEBUG);
507- nih_debug ("Running as PID %d (PPID %d)",
508- (int)getpid (), (int)getppid ());
509+ nih_debug ("Running with UID %d as PID %d (PPID %d)",
510+ (int)getuid (), (int)getpid (), (int)getppid ());
511 #endif /* DEBUG */
512
513
514@@ -223,11 +271,13 @@
515 nih_signal_reset ();
516
517 #ifndef DEBUG
518- /* Catch fatal errors immediately rather than waiting for a new
519- * iteration through the main loop.
520- */
521- nih_signal_set_handler (SIGSEGV, crash_handler);
522- nih_signal_set_handler (SIGABRT, crash_handler);
523+ if (use_session_bus == FALSE) {
524+ /* Catch fatal errors immediately rather than waiting for a new
525+ * iteration through the main loop.
526+ */
527+ nih_signal_set_handler (SIGSEGV, crash_handler);
528+ nih_signal_set_handler (SIGABRT, crash_handler);
529+ }
530 #endif /* DEBUG */
531
532 /* Don't ignore SIGCHLD or SIGALRM, but don't respond to them
533@@ -238,33 +288,35 @@
534 nih_signal_set_handler (SIGALRM, nih_signal_handler);
535
536 #ifndef DEBUG
537- /* Ask the kernel to send us SIGINT when control-alt-delete is
538- * pressed; generate an event with the same name.
539- */
540- reboot (RB_DISABLE_CAD);
541- nih_signal_set_handler (SIGINT, nih_signal_handler);
542- NIH_MUST (nih_signal_add_handler (NULL, SIGINT, cad_handler, NULL));
543-
544- /* Ask the kernel to send us SIGWINCH when alt-uparrow is pressed;
545- * generate a keyboard-request event.
546- */
547- if (ioctl (0, KDSIGACCEPT, SIGWINCH) == 0) {
548- nih_signal_set_handler (SIGWINCH, nih_signal_handler);
549- NIH_MUST (nih_signal_add_handler (NULL, SIGWINCH,
550- kbd_handler, NULL));
551+ if (use_session_bus == FALSE) {
552+ /* Ask the kernel to send us SIGINT when control-alt-delete is
553+ * pressed; generate an event with the same name.
554+ */
555+ reboot (RB_DISABLE_CAD);
556+ nih_signal_set_handler (SIGINT, nih_signal_handler);
557+ NIH_MUST (nih_signal_add_handler (NULL, SIGINT, cad_handler, NULL));
558+
559+ /* Ask the kernel to send us SIGWINCH when alt-uparrow is pressed;
560+ * generate a keyboard-request event.
561+ */
562+ if (ioctl (0, KDSIGACCEPT, SIGWINCH) == 0) {
563+ nih_signal_set_handler (SIGWINCH, nih_signal_handler);
564+ NIH_MUST (nih_signal_add_handler (NULL, SIGWINCH,
565+ kbd_handler, NULL));
566+ }
567+
568+ /* powstatd sends us SIGPWR when it changes /etc/powerstatus */
569+ nih_signal_set_handler (SIGPWR, nih_signal_handler);
570+ NIH_MUST (nih_signal_add_handler (NULL, SIGPWR, pwr_handler, NULL));
571+
572+ /* SIGHUP instructs us to re-load our configuration */
573+ nih_signal_set_handler (SIGHUP, nih_signal_handler);
574+ NIH_MUST (nih_signal_add_handler (NULL, SIGHUP, hup_handler, NULL));
575+
576+ /* SIGUSR1 instructs us to reconnect to D-Bus */
577+ nih_signal_set_handler (SIGUSR1, nih_signal_handler);
578+ NIH_MUST (nih_signal_add_handler (NULL, SIGUSR1, usr1_handler, NULL));
579 }
580-
581- /* powstatd sends us SIGPWR when it changes /etc/powerstatus */
582- nih_signal_set_handler (SIGPWR, nih_signal_handler);
583- NIH_MUST (nih_signal_add_handler (NULL, SIGPWR, pwr_handler, NULL));
584-
585- /* SIGHUP instructs us to re-load our configuration */
586- nih_signal_set_handler (SIGHUP, nih_signal_handler);
587- NIH_MUST (nih_signal_add_handler (NULL, SIGHUP, hup_handler, NULL));
588-
589- /* SIGUSR1 instructs us to reconnect to D-Bus */
590- nih_signal_set_handler (SIGUSR1, nih_signal_handler);
591- NIH_MUST (nih_signal_add_handler (NULL, SIGUSR1, usr1_handler, NULL));
592 #endif /* DEBUG */
593
594
595@@ -279,25 +331,27 @@
596
597 /* Read configuration */
598 NIH_MUST (conf_source_new (NULL, CONFFILE, CONF_FILE));
599- NIH_MUST (conf_source_new (NULL, CONFDIR, CONF_JOB_DIR));
600+ NIH_MUST (conf_source_new (NULL, conf_dir, CONF_JOB_DIR));
601
602 conf_reload ();
603
604 /* Create a listening server for private connections. */
605- while (control_server_open () < 0) {
606- NihError *err;
607+ if (use_session_bus == FALSE) {
608+ while (control_server_open () < 0) {
609+ NihError *err;
610
611- err = nih_error_get ();
612- if (err->number != ENOMEM) {
613- nih_warn ("%s: %s", _("Unable to listen for private connections"),
614- err->message);
615+ err = nih_error_get ();
616+ if (err->number != ENOMEM) {
617+ nih_warn ("%s: %s", _("Unable to listen for private connections"),
618+ err->message);
619+ nih_free (err);
620+ break;
621+ }
622 nih_free (err);
623- break;
624 }
625- nih_free (err);
626 }
627
628- /* Open connection to the system bus; we normally expect this to
629+ /* Open connection to the appropriate D-Bus bus; we normally expect this to
630 * fail and will try again later - don't let ENOMEM stop us though.
631 */
632 while (control_bus_open () < 0) {
633@@ -313,21 +367,32 @@
634 }
635
636 #ifndef DEBUG
637- /* Now that the startup is complete, send all further logging output
638- * to kmsg instead of to the console.
639- */
640- if (system_setup_console (CONSOLE_NONE, FALSE) < 0)
641- nih_free (nih_error_get ());
642+ if (use_session_bus == FALSE) {
643+ /* Now that the startup is complete, send all further logging output
644+ * to kmsg instead of to the console.
645+ */
646+ if (system_setup_console (CONSOLE_NONE, FALSE) < 0)
647+ nih_free (nih_error_get ());
648
649- nih_log_set_logger (logger_kmsg);
650+ nih_log_set_logger (logger_kmsg);
651+ }
652 #endif /* DEBUG */
653
654
655 /* Generate and run the startup event or read the state from the
656 * init daemon that exec'd us
657 */
658- if (! restart) {
659- NIH_MUST (event_new (NULL, STARTUP_EVENT, NULL));
660+ if (! restart ) {
661+ if (disable_startup_event) {
662+ nih_debug ("Startup event disabled");
663+ } else {
664+ NIH_MUST (event_new (NULL,
665+ initial_event
666+ ? initial_event
667+ : STARTUP_EVENT,
668+ NULL));
669+ }
670+
671 } else {
672 sigset_t mask;
673
674@@ -573,3 +638,31 @@
675 }
676 }
677 #endif /* DEBUG */
678+
679+/**
680+ * handle_confdir:
681+ *
682+ * Determine where system configuration files should be loaded from.
683+ **/
684+static void
685+handle_confdir (void)
686+{
687+ char *dir;
688+
689+ /* user has already specified directory on command-line */
690+ if (conf_dir)
691+ goto out;
692+
693+ conf_dir = CONFDIR;
694+
695+ dir = getenv (CONFDIR_ENV);
696+ if (! dir)
697+ return;
698+
699+ conf_dir = dir;
700+
701+out:
702+ nih_debug ("Using alternate configuration directory %s",
703+ conf_dir);
704+}
705+
706
707=== modified file 'init/man/init.8'
708--- init/man/init.8 2010-02-04 19:26:17 +0000
709+++ init/man/init.8 2011-06-03 09:26:24 +0000
710@@ -1,4 +1,4 @@
711-.TH init 8 2010-02-04 "Upstart"
712+.TH init 8 2011-05-31 "Upstart"
713 .\"
714 .SH NAME
715 init \- Upstart process management daemon
716@@ -64,6 +64,27 @@
717 by placing them on the kernel command-line.
718 .\"
719 .TP
720+.B \-\-confdir \fIdirectory\fP
721+Read job configuration files from a directory other than
722+\fI/etc/init\fP.
723+.\"
724+.TP
725+.B \-\-no\-startup\-event
726+Suppress emission of the initial startup event. This option should only
727+be used for testing since it will stop the
728+.BR init (8)
729+daemon from starting \fBany\fP jobs automatically.
730+.\"
731+.TP
732+.B \-\-session
733+Connect to the D\-Bus session bus. This should only be used for testing.
734+.\"
735+.TP
736+.B \-\-startup-event \fIevent\fP
737+Specify a different initial startup event from the standard
738+.BR startup (7) .
739+.\"
740+.TP
741 .B --verbose
742 Outputs verbose messages about job state changes and event emissions to the
743 system console or log, useful for debugging boot.
744@@ -90,7 +111,7 @@
745 .RB < https://launchpad.net/upstart/+bugs >
746 .\"
747 .SH COPYRIGHT
748-Copyright \(co 2010 Canonical Ltd.
749+Copyright \(co 2009-2011 Canonical Ltd.
750 .br
751 This is free software; see the source for copying conditions. There is NO
752 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
753
754=== modified file 'init/paths.h'
755--- init/paths.h 2010-02-26 15:27:14 +0000
756+++ init/paths.h 2011-06-03 09:26:24 +0000
757@@ -1,6 +1,6 @@
758 /* upstart
759 *
760- * Copyright © 2010 Canonical Ltd.
761+ * Copyright © 2010-2011 Canonical Ltd.
762 * Author: Scott James Remnant <scott@netsplit.com>.
763 *
764 * This program is free software; you can redistribute it and/or modify
765@@ -67,7 +67,7 @@
766 /**
767 * CONFDIR:
768 *
769- * Top-level directory of the system configuration files.
770+ * Default top-level directory of the system configuration files.
771 **/
772 #ifndef CONFDIR
773 #define CONFDIR "/etc/init"
774@@ -75,6 +75,20 @@
775
776
777 /**
778+ * CONFDIR_ENV:
779+ *
780+ * If this environment variable is set, read configuration files
781+ * from the location specified, rather than CONFDIR.
782+ *
783+ * Value is expected to be the full path to an alternative job
784+ * configuration directory.
785+ **/
786+#ifndef CONFDIR_ENV
787+#define CONFDIR_ENV "UPSTART_CONFDIR"
788+#endif
789+
790+
791+/**
792 * SHELL:
793 *
794 * This is the shell binary used whenever we need special processing for
795
796=== modified file 'init/tests/test_conf.c'
797--- init/tests/test_conf.c 2011-02-17 23:38:17 +0000
798+++ init/tests/test_conf.c 2011-06-03 09:26:24 +0000
799@@ -2,7 +2,6 @@
800 *
801 * test_conf.c - test suite for init/conf.c
802 *
803- * Copyright © 2011 Google Inc.
804 * Copyright © 2009 Canonical Ltd.
805 * Author: Scott James Remnant <scott@netsplit.com>.
806 *
807
808=== modified file 'init/tests/test_control.c'
809--- init/tests/test_control.c 2011-03-16 22:42:48 +0000
810+++ init/tests/test_control.c 2011-06-03 09:26:24 +0000
811@@ -2,7 +2,6 @@
812 *
813 * test_dbus.c - test suite for init/dbus.c
814 *
815- * Copyright © 2011 Google Inc.
816 * Copyright © 2010 Canonical Ltd.
817 * Author: Scott James Remnant <scott@netsplit.com>.
818 *
819
820=== modified file 'init/tests/test_environ.c'
821--- init/tests/test_environ.c 2011-03-16 22:42:48 +0000
822+++ init/tests/test_environ.c 2011-06-03 09:26:24 +0000
823@@ -2,7 +2,6 @@
824 *
825 * test_environ.c - test suite for init/environ.c
826 *
827- * Copyright © 2011 Google Inc.
828 * Copyright © 2009 Canonical Ltd.
829 * Author: Scott James Remnant <scott@netsplit.com>.
830 *
831
832=== modified file 'init/tests/test_job_class.c'
833--- init/tests/test_job_class.c 2011-05-12 20:42:28 +0000
834+++ init/tests/test_job_class.c 2011-06-03 09:26:24 +0000
835@@ -2,7 +2,6 @@
836 *
837 * test_job_class.c - test suite for init/job_class.c
838 *
839- * Copyright © 2011 Google Inc.
840 * Copyright © 2010 Canonical Ltd.
841 * Author: Scott James Remnant <scott@netsplit.com>.
842 *
843
844=== modified file 'init/tests/test_job_process.c'
845--- init/tests/test_job_process.c 2011-05-12 19:21:16 +0000
846+++ init/tests/test_job_process.c 2011-06-03 09:26:24 +0000
847@@ -2,7 +2,6 @@
848 *
849 * test_job_process.c - test suite for init/job_process.c
850 *
851- * Copyright © 2011 Google Inc.
852 * Copyright © 2011 Canonical Ltd.
853 * Author: Scott James Remnant <scott@netsplit.com>.
854 *
855
856=== modified file 'po/upstart.pot'
857--- po/upstart.pot 2011-03-22 17:52:25 +0000
858+++ po/upstart.pot 2011-06-03 09:26:24 +0000
859@@ -6,76 +6,141 @@
860 #, fuzzy
861 msgid ""
862 msgstr ""
863-"Project-Id-Version: upstart 1.2\n"
864+"Project-Id-Version: upstart 1.3\n"
865 "Report-Msgid-Bugs-To: new@bugs.launchpad.net\n"
866-"POT-Creation-Date: 2011-03-22 10:52-0700\n"
867+"POT-Creation-Date: 2011-05-31 17:01+0100\n"
868 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
869 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
870 "Language-Team: LANGUAGE <LL@li.org>\n"
871+"Language: \n"
872 "MIME-Version: 1.0\n"
873 "Content-Type: text/plain; charset=CHARSET\n"
874 "Content-Transfer-Encoding: 8bit\n"
875
876-#: init/conf.c:238
877+#: init/conf.c:237
878 msgid "Unable to load configuration"
879 msgstr ""
880
881-#: init/conf.c:271
882+#: init/conf.c:270
883 #, c-format
884 msgid "Loading configuration from %s"
885 msgstr ""
886
887-#: init/conf.c:308
888+#: init/conf.c:307
889 #, c-format
890 msgid "Handling deletion of %s"
891 msgstr ""
892
893-#: init/conf.c:379
894+#: init/conf.c:378
895 msgid "Unable to watch configuration file"
896 msgstr ""
897
898-#: init/conf.c:457
899+#: init/conf.c:456
900 msgid "Unable to watch configuration directory"
901 msgstr ""
902
903-#: init/conf.c:569 init/conf.c:653
904+#: init/conf.c:568 init/conf.c:652
905 msgid "Error while loading configuration file"
906 msgstr ""
907
908-#: init/conf.c:609
909+#: init/conf.c:608
910 msgid "Configuration directory deleted"
911 msgstr ""
912
913-#: init/control.c:155
914+#: init/control.c:162
915 msgid "Connection from private client"
916 msgstr ""
917
918-#: init/control.c:290
919+#: init/control.c:301
920 msgid "Disconnected from system bus"
921 msgstr ""
922
923-#: init/control.c:356 init/main.c:546
924+#: init/control.c:367 init/main.c:611
925 msgid "Reloading configuration"
926 msgstr ""
927
928-#: init/control.c:396 init/control.c:507
929+#: init/control.c:407 init/control.c:518
930 msgid "Name may not be empty string"
931 msgstr ""
932
933-#: init/control.c:405
934+#: init/control.c:416
935 #, c-format
936 msgid "Unknown job: %s"
937 msgstr ""
938
939-#: init/control.c:514 init/job_class.c:522 init/job_class.c:710
940-#: init/job_class.c:829 init/job_class.c:953
941+#: init/control.c:525 init/job_class.c:524 init/job_class.c:712
942+#: init/job_class.c:831 init/job_class.c:955
943 msgid "Env must be KEY=VALUE pairs"
944 msgstr ""
945
946-#: init/control.c:666
947+#: init/control.c:677
948 msgid "The log priority given was not recognised"
949 msgstr ""
950
951+#: init/errors.h:58
952+msgid "Illegal parameter"
953+msgstr ""
954+
955+#: init/errors.h:59
956+msgid "Unknown parameter"
957+msgstr ""
958+
959+#: init/errors.h:60 init/errors.h:71
960+msgid "Expected operator"
961+msgstr ""
962+
963+#: init/errors.h:61
964+msgid "Mismatched braces"
965+msgstr ""
966+
967+#: init/errors.h:62
968+msgid "Illegal interval, expected number of seconds"
969+msgstr ""
970+
971+#: init/errors.h:63
972+msgid "Illegal exit status, expected integer"
973+msgstr ""
974+
975+#: init/errors.h:64
976+msgid "Illegal signal status, expected integer"
977+msgstr ""
978+
979+#: init/errors.h:65
980+msgid "Illegal file creation mask, expected octal integer"
981+msgstr ""
982+
983+#: init/errors.h:66
984+msgid "Illegal nice value, expected -20 to 19"
985+msgstr ""
986+
987+#: init/errors.h:67
988+msgid "Illegal oom adjustment, expected -16 to 15 or 'never'"
989+msgstr ""
990+
991+#: init/errors.h:68
992+msgid "Illegal oom score adjustment, expected -999 to 1000 or 'never'"
993+msgstr ""
994+
995+#: init/errors.h:69
996+msgid "Illegal limit, expected 'unlimited' or integer"
997+msgstr ""
998+
999+#: init/errors.h:70
1000+msgid "Expected event"
1001+msgstr ""
1002+
1003+#: init/errors.h:72
1004+msgid "Expected variable name before value"
1005+msgstr ""
1006+
1007+#: init/errors.h:73
1008+msgid "Mismatched parentheses"
1009+msgstr ""
1010+
1011+#: init/errors.h:74
1012+msgid "Name already taken"
1013+msgstr ""
1014+
1015 #: init/event.c:273
1016 #, c-format
1017 msgid "Handling %s event"
1018@@ -164,241 +229,252 @@
1019 msgid "post-stop"
1020 msgstr ""
1021
1022-#: init/job.c:1113 init/job_class.c:756
1023+#: init/job.c:1113 init/job_class.c:758
1024 #, c-format
1025 msgid "Job is already running: %s"
1026 msgstr ""
1027
1028-#: init/job.c:1177 init/job.c:1242 init/job_class.c:875 init/job_class.c:998
1029+#: init/job.c:1177 init/job.c:1242 init/job_class.c:877 init/job_class.c:1000
1030 #, c-format
1031 msgid "Job has already been stopped: %s"
1032 msgstr ""
1033
1034-#: init/job_class.c:559 init/job_class.c:604 init/job_class.c:867
1035-#: init/job_class.c:990
1036+#: init/job_class.c:561 init/job_class.c:606 init/job_class.c:869
1037+#: init/job_class.c:992
1038 #, c-format
1039 msgid "Unknown instance: %s"
1040 msgstr ""
1041
1042-#: init/job_process.c:279
1043+#: init/job_process.c:276
1044 #, c-format
1045 msgid "Failed to spawn %s %s process: %s"
1046 msgstr ""
1047
1048-#: init/job_process.c:285
1049+#: init/job_process.c:282
1050 msgid "Temporary process spawn error"
1051 msgstr ""
1052
1053-#: init/job_process.c:292
1054+#: init/job_process.c:289
1055 #, c-format
1056 msgid "%s %s process (%d)"
1057 msgstr ""
1058
1059-#: init/job_process.c:399
1060+#: init/job_process.c:402
1061 #, c-format
1062 msgid "Pausing %s (%d) [pre-exec] for debug"
1063 msgstr ""
1064
1065-#: init/job_process.c:453
1066+#: init/job_process.c:472
1067 #, c-format
1068 msgid "Failed to open system console: %s"
1069 msgstr ""
1070
1071-#: init/job_process.c:669
1072+#: init/job_process.c:696
1073+#, c-format
1074+msgid "unable to move script fd: %s"
1075+msgstr ""
1076+
1077+#: init/job_process.c:701
1078 #, c-format
1079 msgid "unable to open console: %s"
1080 msgstr ""
1081
1082-#: init/job_process.c:724
1083+#: init/job_process.c:756
1084 #, c-format
1085 msgid "unable to set \"%s\" resource limit: %s"
1086 msgstr ""
1087
1088-#: init/job_process.c:729
1089+#: init/job_process.c:761
1090 #, c-format
1091 msgid "unable to set priority: %s"
1092 msgstr ""
1093
1094-#: init/job_process.c:734
1095+#: init/job_process.c:766
1096 #, c-format
1097 msgid "unable to set oom adjustment: %s"
1098 msgstr ""
1099
1100-#: init/job_process.c:739
1101+#: init/job_process.c:771
1102 #, c-format
1103 msgid "unable to change root directory: %s"
1104 msgstr ""
1105
1106-#: init/job_process.c:744
1107+#: init/job_process.c:776
1108 #, c-format
1109 msgid "unable to change working directory: %s"
1110 msgstr ""
1111
1112-#: init/job_process.c:749
1113+#: init/job_process.c:781
1114 #, c-format
1115 msgid "unable to set trace: %s"
1116 msgstr ""
1117
1118-#: init/job_process.c:754
1119+#: init/job_process.c:786
1120 #, c-format
1121 msgid "unable to execute: %s"
1122 msgstr ""
1123
1124-#: init/job_process.c:785
1125-#, c-format
1126-msgid "Sending TERM signal to %s %s process (%d)"
1127-msgstr ""
1128-
1129-#: init/job_process.c:793
1130-#, c-format
1131-msgid "Failed to send TERM signal to %s %s process (%d): %s"
1132-msgstr ""
1133-
1134-#: init/job_process.c:833
1135-#, c-format
1136-msgid "Sending KILL signal to %s %s process (%d)"
1137-msgstr ""
1138-
1139-#: init/job_process.c:841
1140-#, c-format
1141-msgid "Failed to send KILL signal to %s %s process (%d): %s"
1142-msgstr ""
1143-
1144-#: init/job_process.c:901
1145+#: init/job_process.c:817 init/job_process.c:867
1146+#, c-format
1147+msgid "Sending %s signal to %s %s process (%d)"
1148+msgstr ""
1149+
1150+#: init/job_process.c:826 init/job_process.c:876
1151+#, c-format
1152+msgid "Failed to send %s signal to %s %s process (%d): %s"
1153+msgstr ""
1154+
1155+#: init/job_process.c:937
1156 #, c-format
1157 msgid "%s %s process (%d) terminated with status %d"
1158 msgstr ""
1159
1160-#: init/job_process.c:906
1161+#: init/job_process.c:942
1162 #, c-format
1163 msgid "%s %s process (%d) exited normally"
1164 msgstr ""
1165
1166-#: init/job_process.c:921
1167+#: init/job_process.c:957
1168 #, c-format
1169 msgid "%s %s process (%d) killed by %s signal"
1170 msgstr ""
1171
1172-#: init/job_process.c:925
1173+#: init/job_process.c:961
1174 #, c-format
1175 msgid "%s %s process (%d) killed by signal %d"
1176 msgstr ""
1177
1178-#: init/job_process.c:939
1179+#: init/job_process.c:975
1180 #, c-format
1181 msgid "%s %s process (%d) stopped by %s signal"
1182 msgstr ""
1183
1184-#: init/job_process.c:943
1185+#: init/job_process.c:979
1186 #, c-format
1187 msgid "%s %s process (%d) stopped by signal %d"
1188 msgstr ""
1189
1190-#: init/job_process.c:957
1191+#: init/job_process.c:993
1192 #, c-format
1193 msgid "%s %s process (%d) continued by %s signal"
1194 msgstr ""
1195
1196-#: init/job_process.c:961
1197+#: init/job_process.c:997
1198 #, c-format
1199 msgid "%s %s process (%d) continued by signal %d"
1200 msgstr ""
1201
1202-#: init/job_process.c:1096
1203+#: init/job_process.c:1132
1204 #, c-format
1205 msgid "%s respawning too fast, stopped"
1206 msgstr ""
1207
1208-#: init/job_process.c:1102
1209+#: init/job_process.c:1138
1210 #, c-format
1211 msgid "%s %s process ended, respawning"
1212 msgstr ""
1213
1214-#: init/job_process.c:1342
1215+#: init/job_process.c:1378
1216 #, c-format
1217 msgid "Failed to set ptrace options for %s %s process (%d): %s"
1218 msgstr ""
1219
1220-#: init/job_process.c:1355 init/job_process.c:1550
1221+#: init/job_process.c:1391 init/job_process.c:1586
1222 #, c-format
1223 msgid "Failed to continue traced %s %s process (%d): %s"
1224 msgstr ""
1225
1226-#: init/job_process.c:1395 init/job_process.c:1486 init/job_process.c:1541
1227+#: init/job_process.c:1431 init/job_process.c:1522 init/job_process.c:1577
1228 #, c-format
1229 msgid "Failed to detach traced %s %s process (%d): %s"
1230 msgstr ""
1231
1232-#: init/job_process.c:1435
1233+#: init/job_process.c:1471
1234 #, c-format
1235 msgid "Failed to deliver signal to traced %s %s process (%d): %s"
1236 msgstr ""
1237
1238-#: init/job_process.c:1470
1239+#: init/job_process.c:1506
1240 #, c-format
1241 msgid "Failed to obtain child process id for %s %s process (%d): %s"
1242 msgstr ""
1243
1244-#: init/job_process.c:1477
1245+#: init/job_process.c:1513
1246 #, c-format
1247 msgid "%s %s process (%d) became new process (%d)"
1248 msgstr ""
1249
1250-#: init/job_process.c:1536
1251+#: init/job_process.c:1572
1252 #, c-format
1253 msgid "%s %s process (%d) executable changed"
1254 msgstr ""
1255
1256-#: init/main.c:117
1257+#: init/main.c:123
1258+msgid "specify alternative directory to load configuration files from"
1259+msgstr ""
1260+
1261+#: init/main.c:126
1262+msgid "do not emit any startup event (for testing)"
1263+msgstr ""
1264+
1265+#: init/main.c:131
1266+msgid "use D-Bus session bus rather than system bus (for testing)"
1267+msgstr ""
1268+
1269+#: init/main.c:134
1270+msgid "specify an alternative initial event (for testing)"
1271+msgstr ""
1272+
1273+#: init/main.c:154
1274 msgid "Process management daemon."
1275 msgstr ""
1276
1277-#: init/main.c:119
1278+#: init/main.c:156
1279 msgid ""
1280 "This daemon is normally executed by the kernel and given process id 1 to "
1281 "denote its special status. When executed by a user process, it will "
1282 "actually run /sbin/telinit."
1283 msgstr ""
1284
1285-#: init/main.c:130 util/reboot.c:167 util/shutdown.c:363 util/telinit.c:148
1286+#: init/main.c:172 util/reboot.c:166 util/shutdown.c:363 util/telinit.c:148
1287 msgid "Need to be root"
1288 msgstr ""
1289
1290-#: init/main.c:139
1291+#: init/main.c:181
1292 msgid "Not being executed as init"
1293 msgstr ""
1294
1295-#: init/main.c:187 init/main.c:456
1296+#: init/main.c:229 init/main.c:521
1297 msgid "Unable to set root directory"
1298 msgstr ""
1299
1300-#: init/main.c:198
1301+#: init/main.c:240
1302 msgid "Unable to mount /proc filesystem"
1303 msgstr ""
1304
1305-#: init/main.c:207
1306+#: init/main.c:249
1307 msgid "Unable to mount /sys filesystem"
1308 msgstr ""
1309
1310-#: init/main.c:292
1311+#: init/main.c:345
1312 msgid "Unable to listen for private connections"
1313 msgstr ""
1314
1315-#: init/main.c:473
1316+#: init/main.c:538
1317 #, c-format
1318 msgid "Caught %s, core dumped"
1319 msgstr ""
1320
1321-#: init/main.c:477
1322+#: init/main.c:542
1323 #, c-format
1324 msgid "Caught %s, unable to dump core"
1325 msgstr ""
1326
1327-#: init/main.c:563
1328+#: init/main.c:628
1329 msgid "Reconnecting to system bus"
1330 msgstr ""
1331
1332-#: init/main.c:569
1333+#: init/main.c:634
1334 msgid "Unable to connect to the system bus"
1335 msgstr ""
1336
1337@@ -589,59 +665,59 @@
1338 "Without arguments, this outputs the current log priority."
1339 msgstr ""
1340
1341-#: util/reboot.c:114
1342+#: util/reboot.c:113
1343 msgid "don't sync before reboot or halt"
1344 msgstr ""
1345
1346-#: util/reboot.c:116
1347+#: util/reboot.c:115
1348 msgid "force reboot or halt, don't call shutdown(8)"
1349 msgstr ""
1350
1351-#: util/reboot.c:118
1352+#: util/reboot.c:117
1353 msgid "switch off the power when called as halt"
1354 msgstr ""
1355
1356-#: util/reboot.c:120
1357+#: util/reboot.c:119
1358 msgid "don't actually reboot or halt, just write wtmp record"
1359 msgstr ""
1360
1361-#: util/reboot.c:145
1362+#: util/reboot.c:144
1363 msgid "Halt the system."
1364 msgstr ""
1365
1366-#: util/reboot.c:148
1367+#: util/reboot.c:147
1368 msgid "Power off the system."
1369 msgstr ""
1370
1371-#: util/reboot.c:151
1372+#: util/reboot.c:150
1373 msgid "Reboot the system."
1374 msgstr ""
1375
1376-#: util/reboot.c:155
1377+#: util/reboot.c:154
1378 msgid ""
1379 "This command is intended to instruct the kernel to reboot or halt the "
1380 "system; when run without the -f option, or when in a system runlevel other "
1381 "than 0 or 6, it will actually execute /sbin/shutdown.\n"
1382 msgstr ""
1383
1384-#: util/reboot.c:211
1385+#: util/reboot.c:210
1386 msgid "Calling shutdown"
1387 msgstr ""
1388
1389-#: util/reboot.c:214
1390+#: util/reboot.c:213
1391 #, c-format
1392 msgid "Unable to execute shutdown: %s"
1393 msgstr ""
1394
1395-#: util/reboot.c:235
1396+#: util/reboot.c:234
1397 msgid "Rebooting"
1398 msgstr ""
1399
1400-#: util/reboot.c:239
1401+#: util/reboot.c:238
1402 msgid "Halting"
1403 msgstr ""
1404
1405-#: util/reboot.c:243
1406+#: util/reboot.c:242
1407 msgid "Powering off"
1408 msgstr ""
1409
1410
1411=== modified file 'util/reboot.c'
1412--- util/reboot.c 2011-03-16 22:18:22 +0000
1413+++ util/reboot.c 2011-06-03 09:26:24 +0000
1414@@ -1,6 +1,5 @@
1415 /* upstart
1416 *
1417- * Copyright © 2011 Google Inc.
1418 * Copyright © 2010 Canonical Ltd.
1419 * Author: Scott James Remnant <scott@netsplit.com>.
1420 *

Subscribers

People subscribed via source and target branches