]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/basic/special.h
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / basic / special.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
c2f1db8f 2#pragma once
514f4ef5
LP
3
4/***
5 This file is part of systemd.
6
7 Copyright 2010 Lennart Poettering
8
9 systemd is free software; you can redistribute it and/or modify it
5430f7f2
LP
10 under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation; either version 2.1 of the License, or
514f4ef5
LP
12 (at your option) any later version.
13
14 systemd is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5430f7f2 17 Lesser General Public License for more details.
514f4ef5 18
5430f7f2 19 You should have received a copy of the GNU Lesser General Public License
514f4ef5
LP
20 along with systemd; If not, see <http://www.gnu.org/licenses/>.
21***/
22
23#define SPECIAL_DEFAULT_TARGET "default.target"
24
f1dd0c3f
LP
25/* Shutdown targets */
26#define SPECIAL_UMOUNT_TARGET "umount.target"
514f4ef5
LP
27/* This is not really intended to be started by directly. This is
28 * mostly so that other targets (reboot/halt/poweroff) can depend on
29 * it to bring all services down that want to be brought down on
30 * system shutdown. */
31#define SPECIAL_SHUTDOWN_TARGET "shutdown.target"
177b3ffe
LP
32#define SPECIAL_HALT_TARGET "halt.target"
33#define SPECIAL_POWEROFF_TARGET "poweroff.target"
34#define SPECIAL_REBOOT_TARGET "reboot.target"
35#define SPECIAL_KEXEC_TARGET "kexec.target"
36#define SPECIAL_EXIT_TARGET "exit.target"
6edd7d0a
LP
37#define SPECIAL_SUSPEND_TARGET "suspend.target"
38#define SPECIAL_HIBERNATE_TARGET "hibernate.target"
6524990f 39#define SPECIAL_HYBRID_SLEEP_TARGET "hybrid-sleep.target"
514f4ef5 40
f1dd0c3f 41/* Special boot targets */
177b3ffe
LP
42#define SPECIAL_RESCUE_TARGET "rescue.target"
43#define SPECIAL_EMERGENCY_TARGET "emergency.target"
d5d8429a
LP
44#define SPECIAL_MULTI_USER_TARGET "multi-user.target"
45#define SPECIAL_GRAPHICAL_TARGET "graphical.target"
514f4ef5 46
f1dd0c3f 47/* Early boot targets */
177b3ffe
LP
48#define SPECIAL_SYSINIT_TARGET "sysinit.target"
49#define SPECIAL_SOCKETS_TARGET "sockets.target"
e3d84721
LP
50#define SPECIAL_TIMERS_TARGET "timers.target"
51#define SPECIAL_PATHS_TARGET "paths.target"
5d4caf56 52#define SPECIAL_LOCAL_FS_TARGET "local-fs.target"
21e557ed 53#define SPECIAL_LOCAL_FS_PRE_TARGET "local-fs-pre.target"
700e07ff 54#define SPECIAL_INITRD_FS_TARGET "initrd-fs.target"
7163e1ca 55#define SPECIAL_INITRD_ROOT_DEVICE_TARGET "initrd-root-device.target"
9e5f0f92 56#define SPECIAL_INITRD_ROOT_FS_TARGET "initrd-root-fs.target"
514f4ef5 57#define SPECIAL_REMOTE_FS_TARGET "remote-fs.target" /* LSB's $remote_fs */
21e557ed 58#define SPECIAL_REMOTE_FS_PRE_TARGET "remote-fs-pre.target"
514f4ef5 59#define SPECIAL_SWAP_TARGET "swap.target"
0c17fbce 60#define SPECIAL_NETWORK_ONLINE_TARGET "network-online.target"
19f8d037 61#define SPECIAL_TIME_SYNC_TARGET "time-sync.target" /* LSB's $time */
177b3ffe
LP
62#define SPECIAL_BASIC_TARGET "basic.target"
63
f1dd0c3f 64/* LSB compatibility */
514f4ef5
LP
65#define SPECIAL_NETWORK_TARGET "network.target" /* LSB's $network */
66#define SPECIAL_NSS_LOOKUP_TARGET "nss-lookup.target" /* LSB's $named */
67#define SPECIAL_RPCBIND_TARGET "rpcbind.target" /* LSB's $portmap */
669b04a4
LP
68
69/*
70 * Rules regarding adding further high level targets like the above:
71 *
72 * - Be conservative, only add more of these when we really need
73 * them. We need strong usecases for further additions.
74 *
75 * - When there can be multiple implementations running side-by-side,
76 * it needs to be a .target unit which can pull in all
77 * implementations.
78 *
79 * - If something can be implemented with socket activation, and
80 * without, it needs to be a .target unit, so that it can pull in
81 * the appropriate unit.
82 *
83 * - Otherwise, it should be a .service unit.
84 *
85 * - In some cases it is OK to have both a .service and a .target
86 * unit, i.e. if there can be multiple parallel implementations, but
87 * only one is the "system" one. Example: syslog.
88 *
89 * Or to put this in other words: .service symlinks can be used to
90 * arbitrate between multiple implementations if there can be only one
91 * of a kind. .target units can be used to support multiple
92 * implementations that can run side-by-side.
93 */
177b3ffe 94
f1dd0c3f 95/* Magic early boot services */
93a1d735
LP
96#define SPECIAL_FSCK_SERVICE "systemd-fsck@.service"
97#define SPECIAL_QUOTACHECK_SERVICE "systemd-quotacheck.service"
0c380104 98#define SPECIAL_QUOTAON_SERVICE "quotaon.service"
2b93b027 99#define SPECIAL_REMOUNT_FS_SERVICE "systemd-remount-fs.service"
177b3ffe 100
f1dd0c3f 101/* Services systemd relies on */
514f4ef5 102#define SPECIAL_DBUS_SERVICE "dbus.service"
8f6df3fa 103#define SPECIAL_DBUS_SOCKET "dbus.socket"
64f5002a 104#define SPECIAL_JOURNALD_SOCKET "systemd-journald.socket"
731a676c 105#define SPECIAL_JOURNALD_SERVICE "systemd-journald.service"
d71f0505 106#define SPECIAL_TMPFILES_SETUP_SERVICE "systemd-tmpfiles-setup.service"
177b3ffe 107
f1dd0c3f 108/* Magic init signals */
177b3ffe
LP
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"
514f4ef5 112
9444b1f2 113/* Where we add all our system units, users and machines by default */
a016b922 114#define SPECIAL_SYSTEM_SLICE "system.slice"
9444b1f2
LP
115#define SPECIAL_USER_SLICE "user.slice"
116#define SPECIAL_MACHINE_SLICE "machine.slice"
4ad49000 117#define SPECIAL_ROOT_SLICE "-.slice"
efdb0237
LP
118
119/* The scope unit systemd itself lives in. */
120#define SPECIAL_INIT_SCOPE "init.scope"
11222d0f
LP
121
122/* The root directory. */
123#define SPECIAL_ROOT_MOUNT "-.mount"