]> err.no Git - systemd/commitdiff
units: install a few basic units by default
authorLennart Poettering <lennart@poettering.net>
Tue, 13 Apr 2010 03:18:12 +0000 (05:18 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 13 Apr 2010 03:18:12 +0000 (05:18 +0200)
.gitignore
Makefile.am
units/emergency.service [new file with mode: 0644]
units/systemd-initctl.service.in [new file with mode: 0644]
units/systemd-initctl.socket [new file with mode: 0644]
units/systemd-logger.service.in [new file with mode: 0644]
units/systemd-logger.socket [new file with mode: 0644]

index ac80a41582d3ee9dd9dc7ccfbee92da48c4142b4..f994578e9db9b715b2ddd333fddd0d6722f3dbce 100644 (file)
@@ -1,3 +1,5 @@
+systemd-initctl.service
+systemd-logger.service
 systemd-cgroups-agent
 systemd-initctl
 systemd
index 18f27c42513c707f42cde46466d6e41c476c275a..361786983d9e49ab90a1233b941804af31169697 100644 (file)
@@ -21,14 +21,17 @@ pkgsysconfdir=$(sysconfdir)/systemd
 dbuspolicydir=$(sysconfdir)/dbus-1/system.d
 udevrulesdir=/lib/udev/rules.d
 
+systemunitdir=$(pkgdatadir)/system
+sessionunitdir=$(pkgdatadir)/system
+
 AM_CPPFLAGS = \
         -include $(top_builddir)/config.h \
        -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
-       -DSYSTEM_DATA_UNIT_PATH=\"$(pkgdatadir)/system\" \
+       -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
        -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
        -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
        -DSESSION_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/session\" \
-       -DSESSION_DATA_UNIT_PATH=\"$(pkgdatadir)/session\" \
+       -DSESSION_DATA_UNIT_PATH=\"$(sessionunitdir)\" \
        -DCGROUP_AGENT_PATH=\"$(pkglibexecdir)/systemd-cgroups-agent\"
 
 sbin_PROGRAMS = \
@@ -53,9 +56,21 @@ dbuspolicy_DATA = \
 udevrules_DATA = \
        99-systemd.rules
 
+systemunit_DATA = \
+       units/emergency.service \
+       systemd-initctl.service \
+       units/systemd-initctl.socket \
+       systemd-logger.service \
+       units/systemd-logger.socket
+
 EXTRA_DIST = \
-       org.freedesktop.systemd1.conf
-       99-systemd.rules
+       org.freedesktop.systemd1.conf \
+       99-systemd.rules \
+       units/emergency.service \
+       units/systemd-initctl.service.in \
+       units/systemd-initctl.socket \
+       units/systemd-logger.service.in \
+       units/systemd-logger.socket
 
 BASIC_SOURCES= \
         util.c \
@@ -193,8 +208,15 @@ systemadm_SOURCES = \
 systemadm_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS)
 systemadm_LDADD = $(DBUSGLIB_LIBS) $(GTK_LIBS)
 
+systemd-initctl.service: units/systemd-initctl.service.in Makefile
+       sed -e 's,@libexecdir\@,$(libexecdir),g' < $< > $@
+
+systemd-logger.service: units/systemd-logger.service.in Makefile
+       sed -e 's,@libexecdir\@,$(libexecdir),g' < $< > $@
+
 CLEANFILES = \
        systemd-interfaces.c \
        systemctl.c \
        systemadm.c \
-       systemd-cgroups-agent
+       systemd-initctl.service \
+       systemd-logger.service
diff --git a/units/emergency.service b/units/emergency.service
new file mode 100644 (file)
index 0000000..2e9d049
--- /dev/null
@@ -0,0 +1,10 @@
+[Meta]
+Description=Emergency Shell
+
+[Service]
+ExecStart=/bin/sh
+Type=simple
+StandardInput=tty
+Restart=restart-always
+RestartSec=0
+KillMode=process
diff --git a/units/systemd-initctl.service.in b/units/systemd-initctl.service.in
new file mode 100644 (file)
index 0000000..512392e
--- /dev/null
@@ -0,0 +1,6 @@
+[Meta]
+Description=systemd /dev/initctl Compatibility
+
+[Service]
+ExecStart=@libexecdir@/systemd-initctl
+Type=simple
diff --git a/units/systemd-initctl.socket b/units/systemd-initctl.socket
new file mode 100644 (file)
index 0000000..86e7f40
--- /dev/null
@@ -0,0 +1,6 @@
+[Meta]
+Description=systemd /dev/initctl Compatibility
+
+[Socket]
+ListenFIFO=/dev/initctl
+SocketMode=0600
diff --git a/units/systemd-logger.service.in b/units/systemd-logger.service.in
new file mode 100644 (file)
index 0000000..6723500
--- /dev/null
@@ -0,0 +1,6 @@
+[Meta]
+Description=systemd Logging Daemon
+
+[Service]
+ExecStart=@libexecdir@/systemd-logger
+Type=simple
diff --git a/units/systemd-logger.socket b/units/systemd-logger.socket
new file mode 100644 (file)
index 0000000..eb012c8
--- /dev/null
@@ -0,0 +1,5 @@
+[Meta]
+Description=systemd Logging Socket
+
+[Socket]
+ListenStream=@/org/freedesktop/systemd1/logger