From 0e0320e04500d1e68630b3973714f14cfb7b3450 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 25 Jun 2012 14:24:56 +0200 Subject: units: rename halt/hibernate/kexec/poweroff/reboot/suspend to systed-xxx These service units also execute our own code, hence rename the accordingly and prefix them with systemd- --- units/.gitignore | 74 +++++++++++++-------------- units/halt.service.in | 16 ------ units/halt.target | 4 +- units/hibernate.service.in | 16 ------ units/hibernate.target | 5 +- units/kexec.service.in | 16 ------ units/kexec.target | 4 +- units/poweroff.service.in | 16 ------ units/poweroff.target | 4 +- units/reboot.service.in | 16 ------ units/reboot.target | 4 +- units/suspend.service.in | 16 ------ units/suspend.target | 4 +- units/systemd-halt.service.in | 16 ++++++ units/systemd-hibernate.service.in | 16 ++++++ units/systemd-kexec.service.in | 16 ++++++ units/systemd-poweroff.service.in | 16 ++++++ units/systemd-random-seed-load.service.in | 5 +- units/systemd-random-seed-save.service.in | 5 +- units/systemd-reboot.service.in | 16 ++++++ units/systemd-suspend.service.in | 16 ++++++ units/systemd-update-utmp-runlevel.service.in | 6 ++- units/systemd-update-utmp-shutdown.service.in | 6 ++- units/user/.gitignore | 2 +- units/user/exit.service.in | 17 ------ units/user/exit.target | 4 +- units/user/systemd-exit.service.in | 17 ++++++ 27 files changed, 175 insertions(+), 178 deletions(-) delete mode 100644 units/halt.service.in delete mode 100644 units/hibernate.service.in delete mode 100644 units/kexec.service.in delete mode 100644 units/poweroff.service.in delete mode 100644 units/reboot.service.in delete mode 100644 units/suspend.service.in create mode 100644 units/systemd-halt.service.in create mode 100644 units/systemd-hibernate.service.in create mode 100644 units/systemd-kexec.service.in create mode 100644 units/systemd-poweroff.service.in create mode 100644 units/systemd-reboot.service.in create mode 100644 units/systemd-suspend.service.in delete mode 100644 units/user/exit.service.in create mode 100644 units/user/systemd-exit.service.in (limited to 'units') diff --git a/units/.gitignore b/units/.gitignore index 6808d1c82..2193bedf6 100644 --- a/units/.gitignore +++ b/units/.gitignore @@ -1,48 +1,44 @@ -/hibernate.service -/suspend.service +/systemd-hibernate.service +/systemd-suspend.service /console-getty.service /systemd-journald.service -user@.service -systemd-logind.service -systemd-localed.service -systemd-timedated.service -systemd-hostnamed.service -console-shell.service -systemd-sysctl.service -systemd-ask-password-console.service -rescue.service -systemd-ask-password-wall.service +/user@.service +/systemd-logind.service +/systemd-localed.service +/systemd-timedated.service +/systemd-hostnamed.service +/console-shell.service +/systemd-sysctl.service +/systemd-ask-password-console.service +/rescue.service +/systemd-ask-password-wall.service /systemd-quotacheck.service /systemd-fsck@.service /systemd-fsck-root.service -systemd-tmpfiles-clean.service -systemd-tmpfiles-setup.service -halt.service -poweroff.service -reboot.service -kexec.service -systemd-user-sessions.service -systemd-readahead-done.service -systemd-tmpfiles.service -systemd-readahead-collect.service -systemd-readahead-replay.service -serial-getty@.service -systemd-kmsg-syslogd.service -systemd-modules-load.service +/systemd-tmpfiles-clean.service +/systemd-tmpfiles-setup.service +/systemd-halt.service +/systemd-poweroff.service +/systemd-reboot.service +/systemd-kexec.service +/systemd-user-sessions.service +/systemd-readahead-done.service +/systemd-tmpfiles.service +/systemd-readahead-collect.service +/systemd-readahead-replay.service +/serial-getty@.service +/systemd-modules-load.service /systemd-remount-fs.service -systemd-vconsole-setup.service -systemd-auto-serial-getty.service -systemd-shutdownd.service -systemd-random-seed-load.service -systemd-random-seed-save.service -systemd-initctl.service -systemd-stdout-syslog-bridge.service -getty@.service -systemd-update-utmp-runlevel.service -systemd-update-utmp-shutdown.service -test-env-replace -systemd-binfmt.service -emergency.service +/systemd-vconsole-setup.service +/systemd-shutdownd.service +/systemd-random-seed-load.service +/systemd-random-seed-save.service +/systemd-initctl.service +/getty@.service +/systemd-update-utmp-runlevel.service +/systemd-update-utmp-shutdown.service +/systemd-binfmt.service +/emergency.service /systemd-udev-settle.service /systemd-udev-trigger.service /systemd-udev.service diff --git a/units/halt.service.in b/units/halt.service.in deleted file mode 100644 index b746d1ea3..000000000 --- a/units/halt.service.in +++ /dev/null @@ -1,16 +0,0 @@ -# This file is part of systemd. -# -# 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. - -[Unit] -Description=Halt -DefaultDependencies=no -Requires=shutdown.target umount.target final.target -After=shutdown.target umount.target final.target - -[Service] -Type=oneshot -ExecStart=@SYSTEMCTL@ --force halt diff --git a/units/halt.target b/units/halt.target index 41266b96f..a21d984b2 100644 --- a/units/halt.target +++ b/units/halt.target @@ -9,8 +9,8 @@ Description=Halt Documentation=man:systemd.special(7) DefaultDependencies=no -Requires=halt.service -After=halt.service +Requires=systemd-halt.service +After=systemd-halt.service AllowIsolate=yes [Install] diff --git a/units/hibernate.service.in b/units/hibernate.service.in deleted file mode 100644 index 6dba653d3..000000000 --- a/units/hibernate.service.in +++ /dev/null @@ -1,16 +0,0 @@ -# This file is part of systemd. -# -# 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. - -[Unit] -Description=Hibernate -DefaultDependencies=no -Requires=sleep.target -After=sleep.target - -[Service] -Type=oneshot -ExecStart=@rootlibexecdir@/systemd-sleep hibernate diff --git a/units/hibernate.target b/units/hibernate.target index fc8493c20..c56460237 100644 --- a/units/hibernate.target +++ b/units/hibernate.target @@ -9,6 +9,5 @@ Description=Hibernate Documentation=man:systemd.special(7) DefaultDependencies=no -BindTo=hibernate.service -After=hibernate.service -StopWhenUnneeded=yes +BindTo=systemd-hibernate.service +After=systemd-hibernate.service diff --git a/units/kexec.service.in b/units/kexec.service.in deleted file mode 100644 index 17d034497..000000000 --- a/units/kexec.service.in +++ /dev/null @@ -1,16 +0,0 @@ -# This file is part of systemd. -# -# 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. - -[Unit] -Description=Reboot via kexec -DefaultDependencies=no -Requires=shutdown.target umount.target final.target -After=shutdown.target umount.target final.target - -[Service] -Type=oneshot -ExecStart=@SYSTEMCTL@ --force kexec diff --git a/units/kexec.target b/units/kexec.target index be8eafcf1..90795d0c5 100644 --- a/units/kexec.target +++ b/units/kexec.target @@ -9,8 +9,8 @@ Description=Reboot via kexec Documentation=man:systemd.special(7) DefaultDependencies=no -Requires=kexec.service -After=kexec.service +Requires=systemd-kexec.service +After=systemd-kexec.service AllowIsolate=yes [Install] diff --git a/units/poweroff.service.in b/units/poweroff.service.in deleted file mode 100644 index 851a0f945..000000000 --- a/units/poweroff.service.in +++ /dev/null @@ -1,16 +0,0 @@ -# This file is part of systemd. -# -# 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. - -[Unit] -Description=Power-Off -DefaultDependencies=no -Requires=shutdown.target umount.target final.target -After=shutdown.target umount.target final.target - -[Service] -Type=oneshot -ExecStart=@SYSTEMCTL@ --force poweroff diff --git a/units/poweroff.target b/units/poweroff.target index bb60c33dd..71871033a 100644 --- a/units/poweroff.target +++ b/units/poweroff.target @@ -9,8 +9,8 @@ Description=Power-Off Documentation=man:systemd.special(7) DefaultDependencies=no -Requires=poweroff.service -After=poweroff.service +Requires=systemd-poweroff.service +After=systemd-poweroff.service AllowIsolate=yes [Install] diff --git a/units/reboot.service.in b/units/reboot.service.in deleted file mode 100644 index e6a8aabd9..000000000 --- a/units/reboot.service.in +++ /dev/null @@ -1,16 +0,0 @@ -# This file is part of systemd. -# -# 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. - -[Unit] -Description=Reboot -DefaultDependencies=no -Requires=shutdown.target umount.target final.target -After=shutdown.target umount.target final.target - -[Service] -Type=oneshot -ExecStart=@SYSTEMCTL@ --force reboot diff --git a/units/reboot.target b/units/reboot.target index 9faeb1800..dec8f5679 100644 --- a/units/reboot.target +++ b/units/reboot.target @@ -9,8 +9,8 @@ Description=Reboot Documentation=man:systemd.special(7) DefaultDependencies=no -Requires=reboot.service -After=reboot.service +Requires=systemd-reboot.service +After=systemd-reboot.service AllowIsolate=yes [Install] diff --git a/units/suspend.service.in b/units/suspend.service.in deleted file mode 100644 index 3cf819e47..000000000 --- a/units/suspend.service.in +++ /dev/null @@ -1,16 +0,0 @@ -# This file is part of systemd. -# -# 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. - -[Unit] -Description=Suspend -DefaultDependencies=no -Requires=sleep.target -After=sleep.target - -[Service] -Type=oneshot -ExecStart=@rootlibexecdir@/systemd-sleep suspend diff --git a/units/suspend.target b/units/suspend.target index eaf79bed1..83f69f1b5 100644 --- a/units/suspend.target +++ b/units/suspend.target @@ -9,5 +9,5 @@ Description=Suspend Documentation=man:systemd.special(7) DefaultDependencies=no -BindTo=suspend.service -After=suspend.service +BindTo=systemd-suspend.service +After=systemd-suspend.service diff --git a/units/systemd-halt.service.in b/units/systemd-halt.service.in new file mode 100644 index 000000000..b746d1ea3 --- /dev/null +++ b/units/systemd-halt.service.in @@ -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 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. + +[Unit] +Description=Halt +DefaultDependencies=no +Requires=shutdown.target umount.target final.target +After=shutdown.target umount.target final.target + +[Service] +Type=oneshot +ExecStart=@SYSTEMCTL@ --force halt diff --git a/units/systemd-hibernate.service.in b/units/systemd-hibernate.service.in new file mode 100644 index 000000000..6dba653d3 --- /dev/null +++ b/units/systemd-hibernate.service.in @@ -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 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. + +[Unit] +Description=Hibernate +DefaultDependencies=no +Requires=sleep.target +After=sleep.target + +[Service] +Type=oneshot +ExecStart=@rootlibexecdir@/systemd-sleep hibernate diff --git a/units/systemd-kexec.service.in b/units/systemd-kexec.service.in new file mode 100644 index 000000000..17d034497 --- /dev/null +++ b/units/systemd-kexec.service.in @@ -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 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. + +[Unit] +Description=Reboot via kexec +DefaultDependencies=no +Requires=shutdown.target umount.target final.target +After=shutdown.target umount.target final.target + +[Service] +Type=oneshot +ExecStart=@SYSTEMCTL@ --force kexec diff --git a/units/systemd-poweroff.service.in b/units/systemd-poweroff.service.in new file mode 100644 index 000000000..851a0f945 --- /dev/null +++ b/units/systemd-poweroff.service.in @@ -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 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. + +[Unit] +Description=Power-Off +DefaultDependencies=no +Requires=shutdown.target umount.target final.target +After=shutdown.target umount.target final.target + +[Service] +Type=oneshot +ExecStart=@SYSTEMCTL@ --force poweroff diff --git a/units/systemd-random-seed-load.service.in b/units/systemd-random-seed-load.service.in index 8ea575035..e9156ef08 100644 --- a/units/systemd-random-seed-load.service.in +++ b/units/systemd-random-seed-load.service.in @@ -9,10 +9,9 @@ Description=Load Random Seed Documentation=man:systemd-random-seed-load.service(8) man:random(4) DefaultDependencies=no -Conflicts=shutdown.target -After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service -Before=sysinit.target shutdown.target RequiresMountsFor=@RANDOM_SEED@ +After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service +Before=sysinit.target final.target [Service] Type=oneshot diff --git a/units/systemd-random-seed-save.service.in b/units/systemd-random-seed-save.service.in index 05b3c6147..3444d4ce7 100644 --- a/units/systemd-random-seed-save.service.in +++ b/units/systemd-random-seed-save.service.in @@ -9,10 +9,9 @@ Description=Save Random Seed Documentation=man:systemd-random-seed-load.service(8) man:random(4) DefaultDependencies=no -After=systemd-random-seed-load.service -Before=shutdown.target -Conflicts=systemd-random-seed-load.service RequiresMountsFor=@RANDOM_SEED@ +After=systemd-remount-fs.service systemd-random-seed-load.service +Before=final.target [Service] Type=oneshot diff --git a/units/systemd-reboot.service.in b/units/systemd-reboot.service.in new file mode 100644 index 000000000..e6a8aabd9 --- /dev/null +++ b/units/systemd-reboot.service.in @@ -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 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. + +[Unit] +Description=Reboot +DefaultDependencies=no +Requires=shutdown.target umount.target final.target +After=shutdown.target umount.target final.target + +[Service] +Type=oneshot +ExecStart=@SYSTEMCTL@ --force reboot diff --git a/units/systemd-suspend.service.in b/units/systemd-suspend.service.in new file mode 100644 index 000000000..3cf819e47 --- /dev/null +++ b/units/systemd-suspend.service.in @@ -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 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. + +[Unit] +Description=Suspend +DefaultDependencies=no +Requires=sleep.target +After=sleep.target + +[Service] +Type=oneshot +ExecStart=@rootlibexecdir@/systemd-sleep suspend diff --git a/units/systemd-update-utmp-runlevel.service.in b/units/systemd-update-utmp-runlevel.service.in index 6666dbd79..7b6fbadf1 100644 --- a/units/systemd-update-utmp-runlevel.service.in +++ b/units/systemd-update-utmp-runlevel.service.in @@ -9,8 +9,10 @@ Description=Update UTMP about System Runlevel Changes Documentation=man:utmp(5) DefaultDependencies=no -After=local-fs.target sysinit.target auditd.service runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target systemd-tmpfiles-setup.service -Before=poweroff.service reboot.service halt.service +RequiresMountsFor=/var/log/wtmp +After=systemd-remount-fs.service systemd-tmpfiles-setup.service auditd.service +After=runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target +Before=final.target [Service] Type=oneshot diff --git a/units/systemd-update-utmp-shutdown.service.in b/units/systemd-update-utmp-shutdown.service.in index 5b726c368..8615d150b 100644 --- a/units/systemd-update-utmp-shutdown.service.in +++ b/units/systemd-update-utmp-shutdown.service.in @@ -9,8 +9,10 @@ Description=Update UTMP about System Shutdown Documentation=man:utmp(5) DefaultDependencies=no -After=local-fs.target sysinit.target auditd.service systemd-update-utmp-runlevel.service -Before=poweroff.service reboot.service halt.service +RequiresMountsFor=/var/log/wtmp +After=systemd-remount-fs.service systemd-tmpfiles-setup.service auditd.service +After=systemd-update-utmp-runlevel.service +Before=final.target [Service] Type=oneshot diff --git a/units/user/.gitignore b/units/user/.gitignore index eeb62b32b..41a74f546 100644 --- a/units/user/.gitignore +++ b/units/user/.gitignore @@ -1 +1 @@ -exit.service +/systemd-exit.service diff --git a/units/user/exit.service.in b/units/user/exit.service.in deleted file mode 100644 index a114f6c1b..000000000 --- a/units/user/exit.service.in +++ /dev/null @@ -1,17 +0,0 @@ -# This file is part of systemd. -# -# 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. - -[Unit] -Description=Exit the Session -Documentation=man:systemd.special(7) -DefaultDependencies=no -Requires=shutdown.target -After=shutdown.target - -[Service] -Type=oneshot -ExecStart=@SYSTEMCTL@ --user --force exit diff --git a/units/user/exit.target b/units/user/exit.target index 539e03a9a..b0ad24c48 100644 --- a/units/user/exit.target +++ b/units/user/exit.target @@ -9,8 +9,8 @@ Description=Exit the Session Documentation=man:systemd.special(7) DefaultDependencies=no -Requires=exit.service -After=exit.service +Requires=systemd-exit.service +After=systemd-exit.service AllowIsolate=yes [Install] diff --git a/units/user/systemd-exit.service.in b/units/user/systemd-exit.service.in new file mode 100644 index 000000000..a114f6c1b --- /dev/null +++ b/units/user/systemd-exit.service.in @@ -0,0 +1,17 @@ +# This file is part of systemd. +# +# 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. + +[Unit] +Description=Exit the Session +Documentation=man:systemd.special(7) +DefaultDependencies=no +Requires=shutdown.target +After=shutdown.target + +[Service] +Type=oneshot +ExecStart=@SYSTEMCTL@ --user --force exit -- cgit v1.2.3