chiark / gitweb /
Prep v221: Update and clean up build system to sync with upstream
[elogind.git] / src / basic / special.h
1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
3 #pragma once
4
5 /***
6   This file is part of systemd.
7
8   Copyright 2010 Lennart Poettering
9
10   systemd is free software; you can redistribute it and/or modify it
11   under the terms of the GNU Lesser General Public License as published by
12   the Free Software Foundation; either version 2.1 of the License, or
13   (at your option) any later version.
14
15   systemd is distributed in the hope that it will be useful, but
16   WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18   Lesser General Public License for more details.
19
20   You should have received a copy of the GNU Lesser General Public License
21   along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 ***/
23
24 #define SPECIAL_DEFAULT_TARGET "default.target"
25
26 /* Shutdown targets */
27 #define SPECIAL_UMOUNT_TARGET "umount.target"
28 /* This is not really intended to be started by directly. This is
29  * mostly so that other targets (reboot/halt/poweroff) can depend on
30  * it to bring all services down that want to be brought down on
31  * system shutdown. */
32 #define SPECIAL_SHUTDOWN_TARGET "shutdown.target"
33 #define SPECIAL_HALT_TARGET "halt.target"
34 #define SPECIAL_POWEROFF_TARGET "poweroff.target"
35 #define SPECIAL_REBOOT_TARGET "reboot.target"
36 #define SPECIAL_KEXEC_TARGET "kexec.target"
37 #define SPECIAL_EXIT_TARGET "exit.target"
38 #define SPECIAL_SUSPEND_TARGET "suspend.target"
39 #define SPECIAL_HIBERNATE_TARGET "hibernate.target"
40 #define SPECIAL_HYBRID_SLEEP_TARGET "hybrid-sleep.target"
41
42 /* Special boot targets */
43 #define SPECIAL_RESCUE_TARGET "rescue.target"
44 #define SPECIAL_EMERGENCY_TARGET "emergency.target"
45 #define SPECIAL_MULTI_USER_TARGET "multi-user.target"
46 #define SPECIAL_GRAPHICAL_TARGET "graphical.target"
47
48 /* Early boot targets */
49 #define SPECIAL_SYSINIT_TARGET "sysinit.target"
50 #define SPECIAL_SOCKETS_TARGET "sockets.target"
51 #define SPECIAL_BUSNAMES_TARGET "busnames.target"
52 #define SPECIAL_TIMERS_TARGET "timers.target"
53 #define SPECIAL_PATHS_TARGET "paths.target"
54 #define SPECIAL_LOCAL_FS_TARGET "local-fs.target"
55 #define SPECIAL_LOCAL_FS_PRE_TARGET "local-fs-pre.target"
56 #define SPECIAL_INITRD_FS_TARGET "initrd-fs.target"
57 #define SPECIAL_INITRD_ROOT_FS_TARGET "initrd-root-fs.target"
58 #define SPECIAL_REMOTE_FS_TARGET "remote-fs.target"       /* LSB's $remote_fs */
59 #define SPECIAL_REMOTE_FS_PRE_TARGET "remote-fs-pre.target"
60 #define SPECIAL_SWAP_TARGET "swap.target"
61 #define SPECIAL_NETWORK_ONLINE_TARGET "network-online.target"
62 #define SPECIAL_TIME_SYNC_TARGET "time-sync.target"       /* LSB's $time */
63 #define SPECIAL_BASIC_TARGET "basic.target"
64
65 /* LSB compatibility */
66 #define SPECIAL_NETWORK_TARGET "network.target"           /* LSB's $network */
67 #define SPECIAL_NSS_LOOKUP_TARGET "nss-lookup.target"     /* LSB's $named */
68 #define SPECIAL_RPCBIND_TARGET "rpcbind.target"           /* LSB's $portmap */
69
70 /*
71  * Rules regarding adding further high level targets like the above:
72  *
73  * - Be conservative, only add more of these when we really need
74  *   them. We need strong usecases for further additions.
75  *
76  * - When there can be multiple implementations running side-by-side,
77  *   it needs to be a .target unit which can pull in all
78  *   implementations.
79  *
80  * - If something can be implemented with socket activation, and
81  *   without, it needs to be a .target unit, so that it can pull in
82  *   the appropriate unit.
83  *
84  * - Otherwise, it should be a .service unit.
85  *
86  * - In some cases it is OK to have both a .service and a .target
87  *   unit, i.e. if there can be multiple parallel implementations, but
88  *   only one is the "system" one. Example: syslog.
89  *
90  * Or to put this in other words: .service symlinks can be used to
91  * arbitrate between multiple implementations if there can be only one
92  * of a kind. .target units can be used to support multiple
93  * implementations that can run side-by-side.
94  */
95
96 /* Magic early boot services */
97 #define SPECIAL_FSCK_SERVICE "systemd-fsck@.service"
98 #define SPECIAL_QUOTACHECK_SERVICE "systemd-quotacheck.service"
99 #define SPECIAL_QUOTAON_SERVICE "quotaon.service"
100 #define SPECIAL_REMOUNT_FS_SERVICE "systemd-remount-fs.service"
101
102 /* Services systemd relies on */
103 #define SPECIAL_DBUS_SERVICE "dbus.service"
104 #define SPECIAL_DBUS_SOCKET "dbus.socket"
105 #define SPECIAL_JOURNALD_SOCKET "systemd-journald.socket"
106 #define SPECIAL_JOURNALD_SERVICE "systemd-journald.service"
107
108 /* Magic init signals */
109 #define SPECIAL_KBREQUEST_TARGET "kbrequest.target"
110 #define SPECIAL_SIGPWR_TARGET "sigpwr.target"
111 #define SPECIAL_CTRL_ALT_DEL_TARGET "ctrl-alt-del.target"
112
113 /* Where we add all our system units, users and machines by default */
114 #define SPECIAL_SYSTEM_SLICE "system.slice"
115 #define SPECIAL_USER_SLICE "user.slice"
116 #define SPECIAL_MACHINE_SLICE "machine.slice"
117 #define SPECIAL_ROOT_SLICE "-.slice"