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