1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
/* upstart
*
* Copyright © 2009 Canonical Ltd.
* Author: Scott James Remnant <scott@netsplit.com>.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2, as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef INIT_EVENTS_H
#define INIT_EVENTS_H
/**
* STARTUP_EVENT:
*
* Name of the event that we generate when init is first executed.
**/
#ifndef DEBUG
#define STARTUP_EVENT "startup"
#else /* DEBUG */
#define STARTUP_EVENT "debug"
#endif
/**
* SESSION_END_EVENT:
*
* Name of the event Upstart emits to denote a Session Init
* is shutting down.
**/
#define SESSION_END_EVENT "session-end"
/**
* CTRLALTDEL_EVENT:
*
* Name of the event that we generate when the Control-Alt-Delete key
* combination is pressed.
**/
#define CTRLALTDEL_EVENT "control-alt-delete"
/**
* KBDREQUEST_EVENT:
*
* Name of the event that we generate when the Alt-UpArrow key combination
* is pressed.
**/
#define KBDREQUEST_EVENT "keyboard-request"
/**
* PWRSTATUS_EVENT:
*
* Name of the event that we generate when we receive SIGPWR, indicating
* that the power status has changed.
**/
#define PWRSTATUS_EVENT "power-status-changed"
/**
* JOB_STARTING_EVENT:
*
* Name of the event we generate when we're ready to start a job; the job
* is not actually started until the handling of this event finishes.
**/
#define JOB_STARTING_EVENT "starting"
/**
* JOB_STARTED_EVENT:
*
* Name of the event we generate once a job has been started and is now
* running. This is not generated until the spawned pid is located (if
* appropriate) and the post-start script has finished.
**/
#define JOB_STARTED_EVENT "started"
/**
* JOB_STOPPING_EVENT:
*
* Name of the event we generate when we're ready to stop a job, which
* includes arguments and environment indicating whether the job failed.
* This is run after the pre-stop script has finished without setting the
* goal back to start. The job is not actually stopped until the handling
* of this event finishes.
**/
#define JOB_STOPPING_EVENT "stopping"
/**
* JOB_STOPPED_EVENT:
*
* Name of the event we generate once a job has been stopped and is now
* waiting.
**/
#define JOB_STOPPED_EVENT "stopped"
#endif /* INIT_EVENTS_H */
|