summaryrefslogtreecommitdiff
path: root/src/grp-system
diff options
context:
space:
mode:
Diffstat (limited to 'src/grp-system')
l---------src/grp-system/GNUmakefile1
-rw-r--r--src/grp-system/Makefile5
l---------src/grp-system/grp-utils/GNUmakefile1
l---------src/grp-system/grp-utils/systemd-analyze/GNUmakefile1
-rw-r--r--src/grp-system/grp-utils/systemd-analyze/Makefile1
l---------src/grp-system/grp-utils/systemd-delta/GNUmakefile1
l---------src/grp-system/grp-utils/systemd-fstab-generator/GNUmakefile1
-rw-r--r--src/grp-system/grp-utils/systemd-fstab-generator/Makefile4
l---------src/grp-system/grp-utils/systemd-run/GNUmakefile1
-rw-r--r--src/grp-system/grp-utils/systemd-run/Makefile1
l---------src/grp-system/grp-utils/systemd-sysv-generator/GNUmakefile1
-rw-r--r--src/grp-system/grp-utils/systemd-sysv-generator/Makefile10
l---------src/grp-system/libcore/GNUmakefile1
-rw-r--r--src/grp-system/libcore/include/core/bus-policy.h3
-rw-r--r--src/grp-system/libcore/include/core/busname.h1
-rw-r--r--src/grp-system/libcore/include/core/device.h2
-rw-r--r--src/grp-system/libcore/include/core/killall.h2
-rw-r--r--src/grp-system/libcore/include/core/machine-id-setup.h2
-rw-r--r--src/grp-system/libcore/include/core/mount.h1
-rw-r--r--src/grp-system/libcore/include/core/service.h3
-rw-r--r--src/grp-system/libcore/include/core/slice.h2
-rw-r--r--src/grp-system/libcore/include/core/smack-setup.h2
-rw-r--r--src/grp-system/libcore/include/core/socket.h1
-rw-r--r--src/grp-system/libcore/include/core/swap.h2
-rw-r--r--src/grp-system/libcore/include/core/target.h2
-rw-r--r--src/grp-system/libcore/include/core/timer.h2
-rw-r--r--src/grp-system/libcore/include/core/unit.h2
l---------src/grp-system/libcore/src/GNUmakefile1
-rw-r--r--src/grp-system/libcore/src/Makefile8
-rw-r--r--src/grp-system/libcore/src/dbus-automount.h3
-rw-r--r--src/grp-system/libcore/src/dbus-busname.h1
-rw-r--r--src/grp-system/libcore/src/dbus-path.h2
-rw-r--r--src/grp-system/libcore/src/linux/auto_dev-ioctl.h1
-rw-r--r--src/grp-system/libcore/src/loopback-setup.c1
-rw-r--r--src/grp-system/libcore/src/target.c1
-rw-r--r--src/grp-system/systemctl/.gitignore4
l---------src/grp-system/systemctl/GNUmakefile1
-rw-r--r--src/grp-system/systemctl/Makefile9
l---------src/grp-system/systemd-cgroups-agent/GNUmakefile1
-rw-r--r--src/grp-system/systemd-cgroups-agent/Makefile33
-rw-r--r--src/grp-system/systemd-cgroups-agent/cgroups-agent.c67
l---------src/grp-system/systemd-shutdown/GNUmakefile1
-rw-r--r--src/grp-system/systemd-shutdown/Makefile10
-rw-r--r--src/grp-system/systemd-shutdown/systemd-shutdown.xml6
-rw-r--r--src/grp-system/systemd-shutdown/umount.h2
-rwxr-xr-xsrc/grp-system/systemd/50-systemd-user.xinitrc (renamed from src/grp-system/systemd/50-systemd-user.xorg)0
l---------src/grp-system/systemd/GNUmakefile1
-rw-r--r--src/grp-system/systemd/Makefile13
48 files changed, 192 insertions, 30 deletions
diff --git a/src/grp-system/GNUmakefile b/src/grp-system/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/grp-system/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/Makefile b/src/grp-system/Makefile
index 482fbb5670..c3dad876f5 100644
--- a/src/grp-system/Makefile
+++ b/src/grp-system/Makefile
@@ -1,3 +1,4 @@
+
# -*- Mode: makefile; indent-tabs-mode: t -*-
#
# This file is part of systemd.
@@ -23,10 +24,14 @@
include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
+dist_systempreset_DATA = \
+ 90-systemd.preset
+
nested.subdirs += grp-utils
nested.subdirs += libcore
nested.subdirs += systemctl
nested.subdirs += systemd
+nested.subdirs += systemd-cgroups-agent
nested.subdirs += systemd-shutdown
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-system/grp-utils/GNUmakefile b/src/grp-system/grp-utils/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-system/grp-utils/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/grp-utils/systemd-analyze/GNUmakefile b/src/grp-system/grp-utils/systemd-analyze/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-system/grp-utils/systemd-analyze/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/grp-utils/systemd-analyze/Makefile b/src/grp-system/grp-utils/systemd-analyze/Makefile
index cb1b72e77d..db8a29e9aa 100644
--- a/src/grp-system/grp-utils/systemd-analyze/Makefile
+++ b/src/grp-system/grp-utils/systemd-analyze/Makefile
@@ -34,6 +34,7 @@ systemd_analyze_CFLAGS = \
$(MOUNT_CFLAGS)
systemd_analyze_LDADD = \
+ libsystemd-internal.la \
libcore.la
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-system/grp-utils/systemd-delta/GNUmakefile b/src/grp-system/grp-utils/systemd-delta/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-system/grp-utils/systemd-delta/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/grp-utils/systemd-fstab-generator/GNUmakefile b/src/grp-system/grp-utils/systemd-fstab-generator/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-system/grp-utils/systemd-fstab-generator/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/grp-utils/systemd-fstab-generator/Makefile b/src/grp-system/grp-utils/systemd-fstab-generator/Makefile
index 43475f69e1..be9090654b 100644
--- a/src/grp-system/grp-utils/systemd-fstab-generator/Makefile
+++ b/src/grp-system/grp-utils/systemd-fstab-generator/Makefile
@@ -25,10 +25,10 @@ include $(topsrcdir)/build-aux/Makefile.head.mk
systemgenerator_PROGRAMS += systemd-fstab-generator
systemd_fstab_generator_SOURCES = \
- src/fstab-generator/fstab-generator.c \
- src/core/mount-setup.c
+ src/fstab-generator/fstab-generator.c
systemd_fstab_generator_LDADD = \
+ libcore.la \
libsystemd-shared.la
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-system/grp-utils/systemd-run/GNUmakefile b/src/grp-system/grp-utils/systemd-run/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-system/grp-utils/systemd-run/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/grp-utils/systemd-run/Makefile b/src/grp-system/grp-utils/systemd-run/Makefile
index 9664591eb6..48559f098e 100644
--- a/src/grp-system/grp-utils/systemd-run/Makefile
+++ b/src/grp-system/grp-utils/systemd-run/Makefile
@@ -28,6 +28,7 @@ systemd_run_SOURCES = \
src/run/run.c
systemd_run_LDADD = \
+ libsystemd-internal.la \
libsystemd-shared.la
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-system/grp-utils/systemd-sysv-generator/GNUmakefile b/src/grp-system/grp-utils/systemd-sysv-generator/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-system/grp-utils/systemd-sysv-generator/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/grp-utils/systemd-sysv-generator/Makefile b/src/grp-system/grp-utils/systemd-sysv-generator/Makefile
index 9dec62efdc..dfb065af90 100644
--- a/src/grp-system/grp-utils/systemd-sysv-generator/Makefile
+++ b/src/grp-system/grp-utils/systemd-sysv-generator/Makefile
@@ -29,18 +29,10 @@ systemd_sysv_generator_SOURCES = \
systemd_sysv_generator_LDADD = \
libcore.la
-ifneq ($(HAVE_SYSV_COMPAT),)
sysvinit_DATA = \
docs/sysvinit/README
-$(outdir)/README: docs/sysvinit/README.in
- $(SED_PROCESS)
-
-CLEANFILES += \
- docs/sysvinit/README
-endif # HAVE_SYSV_COMPAT
-
EXTRA_DIST += \
- docs/sysvinit/README.in
+ docs/sysvinit/README.in \
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-system/libcore/GNUmakefile b/src/grp-system/libcore/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-system/libcore/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/libcore/include/core/bus-policy.h b/src/grp-system/libcore/include/core/bus-policy.h
index a338f29af6..3fb64f0fd0 100644
--- a/src/grp-system/libcore/include/core/bus-policy.h
+++ b/src/grp-system/libcore/include/core/bus-policy.h
@@ -19,10 +19,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus/kdbus.h"
#include "systemd-basic/list.h"
#include "systemd-basic/macro.h"
+struct kdbus_item;
+
typedef struct BusNamePolicy BusNamePolicy;
typedef enum BusPolicyAccess {
diff --git a/src/grp-system/libcore/include/core/busname.h b/src/grp-system/libcore/include/core/busname.h
index aa7f0ecb1b..95a356bddc 100644
--- a/src/grp-system/libcore/include/core/busname.h
+++ b/src/grp-system/libcore/include/core/busname.h
@@ -20,7 +20,6 @@
***/
typedef struct BusName BusName;
-typedef struct BusNamePolicy BusNamePolicy;
#include "bus-policy.h"
#include "unit.h"
diff --git a/src/grp-system/libcore/include/core/device.h b/src/grp-system/libcore/include/core/device.h
index 184a1a349b..60d5122966 100644
--- a/src/grp-system/libcore/include/core/device.h
+++ b/src/grp-system/libcore/include/core/device.h
@@ -21,6 +21,8 @@
typedef struct Device Device;
+#include "unit.h"
+
typedef enum DeviceFound {
DEVICE_NOT_FOUND = 0,
DEVICE_FOUND_UDEV = 1,
diff --git a/src/grp-system/libcore/include/core/killall.h b/src/grp-system/libcore/include/core/killall.h
index acc2439f00..bbb101c863 100644
--- a/src/grp-system/libcore/include/core/killall.h
+++ b/src/grp-system/libcore/include/core/killall.h
@@ -19,4 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <stdbool.h>
+
void broadcast_signal(int sig, bool wait_for_exit, bool send_sighup);
diff --git a/src/grp-system/libcore/include/core/machine-id-setup.h b/src/grp-system/libcore/include/core/machine-id-setup.h
index 29f4620646..88830ecc42 100644
--- a/src/grp-system/libcore/include/core/machine-id-setup.h
+++ b/src/grp-system/libcore/include/core/machine-id-setup.h
@@ -19,5 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <systemd/sd-id128.h>
+
int machine_id_commit(const char *root);
int machine_id_setup(const char *root, sd_id128_t requested, sd_id128_t *ret);
diff --git a/src/grp-system/libcore/include/core/mount.h b/src/grp-system/libcore/include/core/mount.h
index 148fedf354..7e200e418e 100644
--- a/src/grp-system/libcore/include/core/mount.h
+++ b/src/grp-system/libcore/include/core/mount.h
@@ -21,6 +21,7 @@
typedef struct Mount Mount;
+#include "cgroup.h"
#include "dynamic-user.h"
#include "kill.h"
diff --git a/src/grp-system/libcore/include/core/service.h b/src/grp-system/libcore/include/core/service.h
index 1ebf62eed6..7e4763a0ae 100644
--- a/src/grp-system/libcore/include/core/service.h
+++ b/src/grp-system/libcore/include/core/service.h
@@ -27,6 +27,7 @@ typedef struct ServiceFDStore ServiceFDStore;
#include "kill.h"
#include "path.h"
+#include "socket.h"
typedef enum ServiceRestart {
SERVICE_RESTART_NO,
@@ -203,7 +204,7 @@ struct Service {
extern const UnitVTable service_vtable;
-int service_set_socket_fd(Service *s, int fd, struct Socket *socket, bool selinux_context_net);
+int service_set_socket_fd(Service *s, int fd, Socket *socket, bool selinux_context_net);
void service_close_socket_fd(Service *s);
const char* service_restart_to_string(ServiceRestart i) _const_;
diff --git a/src/grp-system/libcore/include/core/slice.h b/src/grp-system/libcore/include/core/slice.h
index c9f3f61067..71e05a4d6a 100644
--- a/src/grp-system/libcore/include/core/slice.h
+++ b/src/grp-system/libcore/include/core/slice.h
@@ -21,6 +21,8 @@
typedef struct Slice Slice;
+#include "unit.h"
+
struct Slice {
Unit meta;
diff --git a/src/grp-system/libcore/include/core/smack-setup.h b/src/grp-system/libcore/include/core/smack-setup.h
index 78164c85e6..f8c62ce067 100644
--- a/src/grp-system/libcore/include/core/smack-setup.h
+++ b/src/grp-system/libcore/include/core/smack-setup.h
@@ -21,4 +21,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <stdbool.h>
+
int mac_smack_setup(bool *loaded_policy);
diff --git a/src/grp-system/libcore/include/core/socket.h b/src/grp-system/libcore/include/core/socket.h
index feba21dab3..d17bf70f18 100644
--- a/src/grp-system/libcore/include/core/socket.h
+++ b/src/grp-system/libcore/include/core/socket.h
@@ -24,7 +24,6 @@
typedef struct Socket Socket;
typedef struct SocketPeer SocketPeer;
-#include "mount.h"
#include "service.h"
typedef enum SocketExecCommand {
diff --git a/src/grp-system/libcore/include/core/swap.h b/src/grp-system/libcore/include/core/swap.h
index 64db3267b2..e0c204a062 100644
--- a/src/grp-system/libcore/include/core/swap.h
+++ b/src/grp-system/libcore/include/core/swap.h
@@ -24,6 +24,8 @@
typedef struct Swap Swap;
+#include "unit.h"
+
typedef enum SwapExecCommand {
SWAP_EXEC_ACTIVATE,
SWAP_EXEC_DEACTIVATE,
diff --git a/src/grp-system/libcore/include/core/target.h b/src/grp-system/libcore/include/core/target.h
index 339aea154e..406b80019c 100644
--- a/src/grp-system/libcore/include/core/target.h
+++ b/src/grp-system/libcore/include/core/target.h
@@ -21,6 +21,8 @@
typedef struct Target Target;
+#include "unit.h"
+
struct Target {
Unit meta;
diff --git a/src/grp-system/libcore/include/core/timer.h b/src/grp-system/libcore/include/core/timer.h
index 9cb30249e3..4195423a61 100644
--- a/src/grp-system/libcore/include/core/timer.h
+++ b/src/grp-system/libcore/include/core/timer.h
@@ -23,6 +23,8 @@
typedef struct Timer Timer;
+#include "unit.h"
+
typedef enum TimerBase {
TIMER_ACTIVE,
TIMER_BOOT,
diff --git a/src/grp-system/libcore/include/core/unit.h b/src/grp-system/libcore/include/core/unit.h
index 6864b71183..f40b23828a 100644
--- a/src/grp-system/libcore/include/core/unit.h
+++ b/src/grp-system/libcore/include/core/unit.h
@@ -278,8 +278,10 @@ typedef enum UnitSetPropertiesMode {
#include "automount.h"
#include "busname.h"
#include "device.h"
+#include "mount.h"
#include "path.h"
#include "scope.h"
+#include "service.h"
#include "slice.h"
#include "socket.h"
#include "swap.h"
diff --git a/src/grp-system/libcore/src/GNUmakefile b/src/grp-system/libcore/src/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-system/libcore/src/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/libcore/src/Makefile b/src/grp-system/libcore/src/Makefile
index cd63651f2a..ab731a5b4f 100644
--- a/src/grp-system/libcore/src/Makefile
+++ b/src/grp-system/libcore/src/Makefile
@@ -157,6 +157,7 @@ libcore_la_CFLAGS = \
$(SECCOMP_CFLAGS)
libcore_la_LIBADD = \
+ libsystemd-internal.la \
libsystemd-shared.la \
$(PAM_LIBS) \
$(AUDIT_LIBS) \
@@ -164,7 +165,12 @@ libcore_la_LIBADD = \
$(APPARMOR_LIBS) \
$(MOUNT_LIBS)
-$(outdir)/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
+$(outdir)/load-fragment-gperf-nulstr.c: $(outdir)/load-fragment-gperf.gperf
$(AM_V_GEN)$(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@
+sd.CPPFLAGS += -DMOUNT_PATH=\"$(MOUNT_PATH)\"
+sd.CPPFLAGS += -DUMOUNT_PATH=\"$(UMOUNT_PATH)\"
+sd.CPPFLAGS += -DSYSTEMD_CGROUP_AGENT_PATH=\"$(libexecdir)/systemd-cgroups-agent\"
+sd.CPPFLAGS += -DSYSTEMD_BINARY_PATH=\"$(libexecdir)/systemd\"
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-system/libcore/src/dbus-automount.h b/src/grp-system/libcore/src/dbus-automount.h
index f41adda2a6..5131d747d4 100644
--- a/src/grp-system/libcore/src/dbus-automount.h
+++ b/src/grp-system/libcore/src/dbus-automount.h
@@ -19,6 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <systemd/sd-bus.h>
+
+#include "core/unit.h"
extern const sd_bus_vtable bus_automount_vtable[];
diff --git a/src/grp-system/libcore/src/dbus-busname.h b/src/grp-system/libcore/src/dbus-busname.h
index 8643d1a404..c6aa90a424 100644
--- a/src/grp-system/libcore/src/dbus-busname.h
+++ b/src/grp-system/libcore/src/dbus-busname.h
@@ -19,5 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <systemd/sd-bus.h>
extern const sd_bus_vtable bus_busname_vtable[];
diff --git a/src/grp-system/libcore/src/dbus-path.h b/src/grp-system/libcore/src/dbus-path.h
index d3c19e0c2b..f24b1d5d3d 100644
--- a/src/grp-system/libcore/src/dbus-path.h
+++ b/src/grp-system/libcore/src/dbus-path.h
@@ -19,6 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-
+#include <systemd/sd-bus.h>
extern const sd_bus_vtable bus_path_vtable[];
diff --git a/src/grp-system/libcore/src/linux/auto_dev-ioctl.h b/src/grp-system/libcore/src/linux/auto_dev-ioctl.h
index aeaeb3ea7a..56ab047141 100644
--- a/src/grp-system/libcore/src/linux/auto_dev-ioctl.h
+++ b/src/grp-system/libcore/src/linux/auto_dev-ioctl.h
@@ -10,6 +10,7 @@
#ifndef _LINUX_AUTO_DEV_IOCTL_H
#define _LINUX_AUTO_DEV_IOCTL_H
+#include <linux/limits.h>
#include <linux/auto_fs.h>
#ifdef __KERNEL__
diff --git a/src/grp-system/libcore/src/loopback-setup.c b/src/grp-system/libcore/src/loopback-setup.c
index 8eb6251bd7..d7085640e1 100644
--- a/src/grp-system/libcore/src/loopback-setup.c
+++ b/src/grp-system/libcore/src/loopback-setup.c
@@ -21,7 +21,6 @@
#include <stdlib.h>
#include "core/loopback-setup.h"
-#include "sd-netlink/netlink-util.h"
#include "systemd-basic/missing.h"
#include "systemd-staging/sd-netlink.h"
diff --git a/src/grp-system/libcore/src/target.c b/src/grp-system/libcore/src/target.c
index 1e5212d75d..717dee06a9 100644
--- a/src/grp-system/libcore/src/target.c
+++ b/src/grp-system/libcore/src/target.c
@@ -17,7 +17,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "core/target.h"
#include "core/unit.h"
#include "systemd-basic/log.h"
#include "systemd-basic/special.h"
diff --git a/src/grp-system/systemctl/.gitignore b/src/grp-system/systemctl/.gitignore
index ebd59d3c9e..89c7427edd 100644
--- a/src/grp-system/systemctl/.gitignore
+++ b/src/grp-system/systemctl/.gitignore
@@ -1,2 +1,2 @@
-/systemctl
-/_systemctl
+/systemctl.completion.bash
+/systemctl.completion.zsh
diff --git a/src/grp-system/systemctl/GNUmakefile b/src/grp-system/systemctl/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-system/systemctl/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/systemctl/Makefile b/src/grp-system/systemctl/Makefile
index 3551118514..5931d4dcbc 100644
--- a/src/grp-system/systemctl/Makefile
+++ b/src/grp-system/systemctl/Makefile
@@ -28,6 +28,15 @@ systemctl_SOURCES = \
src/systemctl/systemctl.c
systemctl_LDADD = \
+ libsystemd-internal.la \
libsystemd-shared.la
+files.out.all += systemctl.completion.bash
+files.out.all += systemctl.completion.zsh
+sd.sed_files += systemctl.completion.bash
+sd.sed_files += systemctl.completion.zsh
+sd.CPPFLAGS += -DROOTLIBEXECDIR=\"$(rootlibexecdir)\"
+sd.CPPFLAGS += -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\"
+sd.CPPFLAGS += -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\"
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-system/systemd-cgroups-agent/GNUmakefile b/src/grp-system/systemd-cgroups-agent/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-system/systemd-cgroups-agent/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/systemd-cgroups-agent/Makefile b/src/grp-system/systemd-cgroups-agent/Makefile
new file mode 100644
index 0000000000..5d49f891fd
--- /dev/null
+++ b/src/grp-system/systemd-cgroups-agent/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += systemd-cgroups-agent
+systemd_cgroups_agent_SOURCES = \
+ src/cgroups-agent/cgroups-agent.c
+
+systemd_cgroups_agent_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-system/systemd-cgroups-agent/cgroups-agent.c b/src/grp-system/systemd-cgroups-agent/cgroups-agent.c
new file mode 100644
index 0000000000..1475334fc1
--- /dev/null
+++ b/src/grp-system/systemd-cgroups-agent/cgroups-agent.c
@@ -0,0 +1,67 @@
+/***
+ This file is part of systemd.
+
+ Copyright 2010 Lennart Poettering
+
+ systemd is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ systemd 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+#include <stdlib.h>
+#include <sys/socket.h>
+
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/socket-util.h"
+
+int main(int argc, char *argv[]) {
+
+ static const union sockaddr_union sa = {
+ .un.sun_family = AF_UNIX,
+ .un.sun_path = "/run/systemd/cgroups-agent",
+ };
+
+ _cleanup_close_ int fd = -1;
+ ssize_t n;
+ size_t l;
+
+ if (argc != 2) {
+ log_error("Incorrect number of arguments.");
+ return EXIT_FAILURE;
+ }
+
+ log_set_target(LOG_TARGET_AUTO);
+ log_parse_environment();
+ log_open();
+
+ fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0);
+ if (fd < 0) {
+ log_debug_errno(errno, "Failed to allocate socket: %m");
+ return EXIT_FAILURE;
+ }
+
+ l = strlen(argv[1]);
+
+ n = sendto(fd, argv[1], l, 0, &sa.sa, SOCKADDR_UN_LEN(sa.un));
+ if (n < 0) {
+ log_debug_errno(errno, "Failed to send cgroups agent message: %m");
+ return EXIT_FAILURE;
+ }
+
+ if ((size_t) n != l) {
+ log_debug("Datagram size mismatch");
+ return EXIT_FAILURE;
+ }
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/grp-system/systemd-shutdown/GNUmakefile b/src/grp-system/systemd-shutdown/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-system/systemd-shutdown/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/systemd-shutdown/Makefile b/src/grp-system/systemd-shutdown/Makefile
index f68758174a..619f1bbdb5 100644
--- a/src/grp-system/systemd-shutdown/Makefile
+++ b/src/grp-system/systemd-shutdown/Makefile
@@ -27,13 +27,13 @@ rootlibexec_PROGRAMS += systemd-shutdown
systemd_shutdown_SOURCES = \
src/core/umount.c \
src/core/umount.h \
- src/core/shutdown.c \
- src/core/mount-setup.c \
- src/core/mount-setup.h \
- src/core/killall.h \
- src/core/killall.c
+ src/core/shutdown.c
systemd_shutdown_LDADD = \
+ libcore.la \
libsystemd-shared.la
+sd.CPPFLAGS += -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\"
+sd.CPPFLAGS += -DKEXEC=\"$(KEXEC)\"
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-system/systemd-shutdown/systemd-shutdown.xml b/src/grp-system/systemd-shutdown/systemd-shutdown.xml
index d16e5d628f..b1d1f87ce9 100644
--- a/src/grp-system/systemd-shutdown/systemd-shutdown.xml
+++ b/src/grp-system/systemd-shutdown/systemd-shutdown.xml
@@ -21,10 +21,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
-<refentry id="systemd-halt.service">
+<refentry id="systemd-shutdown">
<refentryinfo>
- <title>systemd-halt.service</title>
+ <title>systemd-shutdown</title>
<productname>systemd</productname>
<authorgroup>
@@ -38,7 +38,7 @@
</refentryinfo>
<refmeta>
- <refentrytitle>systemd-halt.service</refentrytitle>
+ <refentrytitle>systemd-shutdown</refentrytitle>
<manvolnum>8</manvolnum>
</refmeta>
diff --git a/src/grp-system/systemd-shutdown/umount.h b/src/grp-system/systemd-shutdown/umount.h
index 4e2215a47d..ce2fd9ec58 100644
--- a/src/grp-system/systemd-shutdown/umount.h
+++ b/src/grp-system/systemd-shutdown/umount.h
@@ -19,6 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <stdbool.h>
+
int umount_all(bool *changed);
int swapoff_all(bool *changed);
diff --git a/src/grp-system/systemd/50-systemd-user.xorg b/src/grp-system/systemd/50-systemd-user.xinitrc
index 4d49767228..4d49767228 100755
--- a/src/grp-system/systemd/50-systemd-user.xorg
+++ b/src/grp-system/systemd/50-systemd-user.xinitrc
diff --git a/src/grp-system/systemd/GNUmakefile b/src/grp-system/systemd/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-system/systemd/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/systemd/Makefile b/src/grp-system/systemd/Makefile
index 7f7fbb963e..ab2a5fa7c8 100644
--- a/src/grp-system/systemd/Makefile
+++ b/src/grp-system/systemd/Makefile
@@ -32,7 +32,12 @@ systemd_CFLAGS = \
$(MOUNT_CFLAGS)
systemd_LDADD = \
- libcore.la
+ libcore.la \
+ libsystemd-internal.la
+
+dist_tmpfiles_DATA = \
+ tmpfiles.d/systemd.conf \
+ systemd-tmpfs.conf
dist_pkgsysconf_DATA += \
src/core/system.conf \
@@ -70,4 +75,10 @@ dist_systemunit_DATA_busnames += \
BUSNAMES_TARGET_WANTS += \
org.freedesktop.systemd1.busname
+sd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\"
+
+sd.CPPFLAGS += -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\"
+sd.CPPFLAGS += -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\"
+sd.CPPFLAGS += -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\"
+
include $(topsrcdir)/build-aux/Makefile.tail.mk