]> err.no Git - systemd/commitdiff
units: introduce kexec.service, kexec.target and exit.target
authorLennart Poettering <lennart@poettering.net>
Wed, 13 Oct 2010 22:57:52 +0000 (00:57 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 13 Oct 2010 22:57:52 +0000 (00:57 +0200)
Makefile.am
units/.gitignore
units/kexec.service.in [new file with mode: 0644]
units/kexec.target [new file with mode: 0644]
units/session/exit.service.in
units/session/exit.target [new file with mode: 0644]

index e432dcbbe44149eb58ab834102721cf10d168f24..b15cb123bef3e444fcda02a48910b057cbe33324 100644 (file)
@@ -162,6 +162,7 @@ dist_systemunit_DATA = \
        units/basic.target \
        units/getty.target \
        units/halt.target \
+       units/kexec.target \
        units/local-fs.target \
        units/network.target \
        units/nss-lookup.target \
@@ -229,10 +230,12 @@ nodist_systemunit_DATA = \
        units/systemd-readahead-done.service \
        units/systemd-tmpfiles.service \
        units/systemd-user-sessions.service \
-       units/syslog.target
+       units/syslog.target \
+       units/kexec.service
 
 dist_sessionunit_DATA = \
-       units/session/default.target
+       units/session/default.target \
+       units/session/exit.target
 
 nodist_sessionunit_DATA = \
        units/session/remote-fs.target \
@@ -262,6 +265,7 @@ EXTRA_DIST = \
        units/systemd-tmpfiles.service.in \
        units/systemd-user-sessions.service.in \
        units/syslog.target.in \
+       units/kexec.service.in \
        units/session/exit.service.in \
        systemd.pc.in
 
index 00a40d4e9cc814acb184342340b24726e3d14847..83fc32cfd9bc560e909efdc2f4dc9f7b116b01c8 100644 (file)
@@ -1,3 +1,4 @@
+kexec.service
 systemd-user-sessions.service
 systemd-readahead-done.service
 systemd-tmpfiles.service
diff --git a/units/kexec.service.in b/units/kexec.service.in
new file mode 100644 (file)
index 0000000..70ad227
--- /dev/null
@@ -0,0 +1,16 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Reboot via kexec
+DefaultDependencies=no
+Requires=shutdown.target umount.target
+After=shutdown.target umount.target
+
+[Service]
+Type=oneshot
+ExecStart=@SYSTEMCTL@ --force kexec
diff --git a/units/kexec.target b/units/kexec.target
new file mode 100644 (file)
index 0000000..b77e6a4
--- /dev/null
@@ -0,0 +1,18 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+
+# See systemd.special(7) for details
+
+[Unit]
+Description=Reboot via kexec
+DefaultDependencies=no
+Requires=kexec.service
+After=kexec.service
+AllowIsolate=yes
+
+[Install]
+Alias=ctrl-alt-del.target
index d098d0da501581317945ea1b5156a3b0f1d2fdbd..024fbe172d236d93661dcfdbdd2943953470017e 100644 (file)
@@ -1,9 +1,18 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+
+# See systemd.special(7) for details
+
 [Unit]
-Description=Exit
+Description=Exit the Session
 DefaultDependencies=no
 Requires=shutdown.target
 After=shutdown.target
 
 [Service]
 Type=oneshot
-ExecStart=@SYSTEMCTL@ --session daemon-exit
+ExecStart=@SYSTEMCTL@ --session --force exit
diff --git a/units/session/exit.target b/units/session/exit.target
new file mode 100644 (file)
index 0000000..f34844c
--- /dev/null
@@ -0,0 +1,18 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+
+# See systemd.special(7) for details
+
+[Unit]
+Description=Exit the Session
+DefaultDependencies=no
+Requires=exit.service
+After=exit.service
+AllowIsolate=yes
+
+[Install]
+Alias=ctrl-alt-del.target