summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorFabiano Fidencio <fidencio@profusion.mobi>2010-10-07 04:24:41 -0700
committerLennart Poettering <lennart@poettering.net>2010-10-07 19:23:46 +0200
commitb1b2a107d15a370d40b200172837bdd82ff3c3b2 (patch)
treee0a7726091f28047f0fb5958b1c3fdb21224030f /Makefile.am
parente3478379751fda30316204c68112b5a2b9ffd5a7 (diff)
shutdown: Adding binary to shutdown the system
This functions are working as follows: - Send a SIGTERM to all processes that may be finished - Send a SIGKILL to all processes that still live and may be finished - Try to unmount all mount points - Try to remount read-only all mount points that can't be umounted - Umount all swap devices - Umount and detach all loopback devices - Call [poweroff|halt|reboot|kexec] TODO: - Umount device-mapper. - Make log work. So far it is being useless as we do not parse /etc/systemd/system.conf, kernel command line but just environment, however we're executed by init and thus have no useful variables. Forcing it to target=kmsg/console and level=debug also does not produce any output, however writing to /dev/console does work (hack used during debug).
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am17
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 4b248c0fc5..a79e94e893 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,6 +35,7 @@ tmpfilesdir=$(sysconfdir)/tmpfiles.d
# And these are the special ones for /
rootdir=@rootdir@
rootbindir=$(rootdir)/bin
+rootsbindir=$(rootdir)/sbin
rootlibexecdir=$(rootdir)/lib/systemd
systemunitdir=$(rootdir)/lib/systemd/system
@@ -50,9 +51,11 @@ AM_CPPFLAGS = \
-DSESSION_DATA_UNIT_PATH=\"$(sessionunitdir)\" \
-DCGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
-DSYSTEMD_BINARY_PATH=\"$(rootbindir)/systemd\" \
+ -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
-DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
-DRUNTIME_DIR=\"$(localstatedir)/run\" \
-DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
+ -DKEXEC_BINARY_PATH=\"$(rootsbindir)/kexec\" \
-I $(top_srcdir)/src
if TARGET_GENTOO
@@ -96,6 +99,7 @@ rootlibexec_PROGRAMS = \
systemd-update-utmp \
systemd-random-seed \
systemd-shutdownd \
+ systemd-shutdown \
systemd-modules-load \
systemd-remount-api-vfs \
systemd-kmsg-syslogd \
@@ -639,6 +643,19 @@ systemd_shutdownd_CFLAGS = \
systemd_shutdownd_LDADD = \
libsystemd-basic.la
+systemd_shutdown_SOURCES = \
+ src/mount-setup.c \
+ src/umount.c \
+ src/shutdown.c
+
+systemd_shutdown_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(UDEV_CFLAGS)
+
+systemd_shutdown_LDADD = \
+ libsystemd-basic.la \
+ $(UDEV_LIBS)
+
systemd_modules_load_SOURCES = \
src/modules-load.c