From 46574a5b4afeac0c3f69f15ce47c460309cb9bec Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 14 Oct 2010 02:58:37 +0200 Subject: units: get rid of distro-specific shutdown scripts, replace them by systemd-shutdown invocations --- units/.gitignore | 3 +++ units/arch/halt.service | 19 ------------------- units/arch/poweroff.service | 19 ------------------- units/arch/reboot.service | 19 ------------------- units/debian/halt.service | 19 ------------------- units/debian/killall.service | 18 ------------------ units/debian/poweroff.service | 19 ------------------- units/debian/reboot.service | 19 ------------------- units/fedora/halt.service | 19 ------------------- units/fedora/killall.service | 18 ------------------ units/fedora/poweroff.service | 19 ------------------- units/fedora/reboot.service | 19 ------------------- units/gentoo/halt.service | 19 ------------------- units/gentoo/killall.service | 18 ------------------ units/gentoo/poweroff.service | 19 ------------------- units/gentoo/reboot.service | 18 ------------------ units/halt.service.in | 16 ++++++++++++++++ units/poweroff.service.in | 16 ++++++++++++++++ units/reboot.service.in | 16 ++++++++++++++++ units/suse/halt.service | 19 ------------------- units/suse/poweroff.service | 19 ------------------- units/suse/reboot.service | 19 ------------------- 22 files changed, 51 insertions(+), 338 deletions(-) delete mode 100644 units/arch/halt.service delete mode 100644 units/arch/poweroff.service delete mode 100644 units/arch/reboot.service delete mode 100644 units/debian/halt.service delete mode 100644 units/debian/killall.service delete mode 100644 units/debian/poweroff.service delete mode 100644 units/debian/reboot.service delete mode 100644 units/fedora/halt.service delete mode 100644 units/fedora/killall.service delete mode 100644 units/fedora/poweroff.service delete mode 100644 units/fedora/reboot.service delete mode 100644 units/gentoo/halt.service delete mode 100644 units/gentoo/killall.service delete mode 100644 units/gentoo/poweroff.service delete mode 100644 units/gentoo/reboot.service create mode 100644 units/halt.service.in create mode 100644 units/poweroff.service.in create mode 100644 units/reboot.service.in delete mode 100644 units/suse/halt.service delete mode 100644 units/suse/poweroff.service delete mode 100644 units/suse/reboot.service (limited to 'units') diff --git a/units/.gitignore b/units/.gitignore index 83fc32cfd9..77d7e28690 100644 --- a/units/.gitignore +++ b/units/.gitignore @@ -1,3 +1,6 @@ +halt.service +poweroff.service +reboot.service kexec.service systemd-user-sessions.service systemd-readahead-done.service diff --git a/units/arch/halt.service b/units/arch/halt.service deleted file mode 100644 index 2079bc025c..0000000000 --- a/units/arch/halt.service +++ /dev/null @@ -1,19 +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 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=Halt -DefaultDependencies=no -Requires=shutdown.target umount.target -After=shutdown.target umount.target - -[Service] -Type=oneshot -RemainAfterExit=yes -Environment=RUNLEVEL=0 -ExecStart=/etc/rc.shutdown -StandardOutput=tty diff --git a/units/arch/poweroff.service b/units/arch/poweroff.service deleted file mode 100644 index df2812fd9b..0000000000 --- a/units/arch/poweroff.service +++ /dev/null @@ -1,19 +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 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=Power-Off -DefaultDependencies=no -Requires=shutdown.target umount.target -After=shutdown.target umount.target - -[Service] -Type=oneshot -RemainAfterExit=yes -Environment=RUNLEVEL=0 -ExecStart=/etc/rc.shutdown -StandardOutput=tty diff --git a/units/arch/reboot.service b/units/arch/reboot.service deleted file mode 100644 index ae5c979e3e..0000000000 --- a/units/arch/reboot.service +++ /dev/null @@ -1,19 +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 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 -DefaultDependencies=no -Requires=shutdown.target umount.target -After=shutdown.target umount.target - -[Service] -Type=oneshot -RemainAfterExit=yes -Environment=RUNLEVEL=6 -ExecStart=/etc/rc.shutdown -StandardOutput=tty diff --git a/units/debian/halt.service b/units/debian/halt.service deleted file mode 100644 index 96061be56f..0000000000 --- a/units/debian/halt.service +++ /dev/null @@ -1,19 +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 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=Halt -DefaultDependencies=no -Requires=shutdown.target umount.target killall.service -After=shutdown.target umount.target killall.service - -[Service] -Type=oneshot -RemainAfterExit=yes -Environment=INIT_HALT=HALT RUNLEVEL=0 -ExecStart=/etc/init.d/halt stop -StandardOutput=tty diff --git a/units/debian/killall.service b/units/debian/killall.service deleted file mode 100644 index b7ed11aca6..0000000000 --- a/units/debian/killall.service +++ /dev/null @@ -1,18 +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 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=Kill All Processes -DefaultDependencies=no -After=shutdown.target -RefuseManualStart=yes - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=/etc/init.d/sendsigs stop -StandardOutput=tty diff --git a/units/debian/poweroff.service b/units/debian/poweroff.service deleted file mode 100644 index 34a6683040..0000000000 --- a/units/debian/poweroff.service +++ /dev/null @@ -1,19 +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 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=Power-Off -DefaultDependencies=no -Requires=shutdown.target umount.target killall.service -After=shutdown.target umount.target killall.service - -[Service] -Type=oneshot -RemainAfterExit=yes -Environment=RUNLEVEL=0 -ExecStart=/etc/init.d/halt stop -StandardOutput=tty diff --git a/units/debian/reboot.service b/units/debian/reboot.service deleted file mode 100644 index 99f259e992..0000000000 --- a/units/debian/reboot.service +++ /dev/null @@ -1,19 +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 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 -DefaultDependencies=no -Requires=shutdown.target umount.target killall.service -After=shutdown.target umount.target killall.service - -[Service] -Type=oneshot -RemainAfterExit=yes -Environment=RUNLEVEL=6 -ExecStart=/etc/init.d/reboot stop -StandardOutput=tty diff --git a/units/fedora/halt.service b/units/fedora/halt.service deleted file mode 100644 index c337dce6d9..0000000000 --- a/units/fedora/halt.service +++ /dev/null @@ -1,19 +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 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=Halt -DefaultDependencies=no -Requires=shutdown.target umount.target killall.service -After=shutdown.target umount.target killall.service - -[Service] -Type=oneshot -RemainAfterExit=yes -Environment=INIT_HALT=HALT RUNLEVEL=0 -ExecStart=/etc/init.d/halt start -StandardOutput=tty diff --git a/units/fedora/killall.service b/units/fedora/killall.service deleted file mode 100644 index b81b6a83d1..0000000000 --- a/units/fedora/killall.service +++ /dev/null @@ -1,18 +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 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=Kill All Processes -DefaultDependencies=no -After=shutdown.target -RefuseManualStart=yes - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=-/etc/init.d/killall start -StandardOutput=tty diff --git a/units/fedora/poweroff.service b/units/fedora/poweroff.service deleted file mode 100644 index dbbed75d6d..0000000000 --- a/units/fedora/poweroff.service +++ /dev/null @@ -1,19 +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 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=Power-Off -DefaultDependencies=no -Requires=shutdown.target umount.target killall.service -After=shutdown.target umount.target killall.service - -[Service] -Type=oneshot -RemainAfterExit=yes -Environment=RUNLEVEL=0 -ExecStart=/etc/init.d/halt start -StandardOutput=tty diff --git a/units/fedora/reboot.service b/units/fedora/reboot.service deleted file mode 100644 index ca8b3b182a..0000000000 --- a/units/fedora/reboot.service +++ /dev/null @@ -1,19 +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 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 -DefaultDependencies=no -Requires=shutdown.target umount.target killall.service -After=shutdown.target umount.target killall.service - -[Service] -Type=oneshot -RemainAfterExit=yes -Environment=RUNLEVEL=6 -ExecStart=/etc/init.d/reboot start -StandardOutput=tty diff --git a/units/gentoo/halt.service b/units/gentoo/halt.service deleted file mode 100644 index d97b942fe0..0000000000 --- a/units/gentoo/halt.service +++ /dev/null @@ -1,19 +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 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=Halt -DefaultDependencies=no -Requires=shutdown.target umount.target killall.service -After=shutdown.target umount.target killall.service - -[Service] -Type=oneshot -RemainAfterExit=yes -Environment=INIT_HALT=HALT RC_DOWN_HARDDISK=yes -ExecStart=/etc/init.d/shutdown.sh -StandardOutput=tty diff --git a/units/gentoo/killall.service b/units/gentoo/killall.service deleted file mode 100644 index de994d1f03..0000000000 --- a/units/gentoo/killall.service +++ /dev/null @@ -1,18 +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 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=Kill All Processes -DefaultDependencies=no -After=shutdown.target -RefuseManualStart=yes - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=-/etc/init.d/killprocs start -StandardOutput=tty diff --git a/units/gentoo/poweroff.service b/units/gentoo/poweroff.service deleted file mode 100644 index 2483f9448c..0000000000 --- a/units/gentoo/poweroff.service +++ /dev/null @@ -1,19 +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 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=Power-Off -DefaultDependencies=no -Requires=shutdown.target umount.target killall.service -After=shutdown.target umount.target killall.service - -[Service] -Type=oneshot -RemainAfterExit=yes -Environment=RC_DOWN_HARDDISK=yes -ExecStart=/etc/init.d/shutdown.sh -StandardOutput=tty diff --git a/units/gentoo/reboot.service b/units/gentoo/reboot.service deleted file mode 100644 index 8f8d7328c7..0000000000 --- a/units/gentoo/reboot.service +++ /dev/null @@ -1,18 +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 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 -DefaultDependencies=no -Requires=shutdown.target umount.target killall.service -After=shutdown.target umount.target killall.service - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=/etc/init.d/reboot.sh -StandardOutput=tty diff --git a/units/halt.service.in b/units/halt.service.in new file mode 100644 index 0000000000..730c4c2955 --- /dev/null +++ b/units/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 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=Halt +DefaultDependencies=no +Requires=shutdown.target umount.target +After=shutdown.target umount.target + +[Service] +Type=oneshot +ExecStart=@SYSTEMCTL@ --force halt diff --git a/units/poweroff.service.in b/units/poweroff.service.in new file mode 100644 index 0000000000..da66f8efce --- /dev/null +++ b/units/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 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=Power-Off +DefaultDependencies=no +Requires=shutdown.target umount.target +After=shutdown.target umount.target + +[Service] +Type=oneshot +ExecStart=@SYSTEMCTL@ --force poweroff diff --git a/units/reboot.service.in b/units/reboot.service.in new file mode 100644 index 0000000000..e5e666f2d7 --- /dev/null +++ b/units/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 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 +DefaultDependencies=no +Requires=shutdown.target umount.target +After=shutdown.target umount.target + +[Service] +Type=oneshot +ExecStart=@SYSTEMCTL@ --force reboot diff --git a/units/suse/halt.service b/units/suse/halt.service deleted file mode 100644 index d826ca3e22..0000000000 --- a/units/suse/halt.service +++ /dev/null @@ -1,19 +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 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=Halt -DefaultDependencies=no -Requires=shutdown.target umount.target -After=shutdown.target umount.target - -[Service] -Type=oneshot -RemainAfterExit=yes -Environment=INIT_HALT=HALT RUNLEVEL=0 COLD_BOOT=1 -ExecStart=/etc/init.d/halt -StandardOutput=tty diff --git a/units/suse/poweroff.service b/units/suse/poweroff.service deleted file mode 100644 index fe8c67761e..0000000000 --- a/units/suse/poweroff.service +++ /dev/null @@ -1,19 +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 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=Power-Off -DefaultDependencies=no -Requires=shutdown.target umount.target -After=shutdown.target umount.target - -[Service] -Type=oneshot -RemainAfterExit=yes -Environment=COLD_BOOT=1 -ExecStart=/etc/init.d/halt -StandardOutput=tty diff --git a/units/suse/reboot.service b/units/suse/reboot.service deleted file mode 100644 index 001d1364a0..0000000000 --- a/units/suse/reboot.service +++ /dev/null @@ -1,19 +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 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 -DefaultDependencies=no -Requires=shutdown.target umount.target -After=shutdown.target umount.target - -[Service] -Type=oneshot -RemainAfterExit=yes -Environment=COLD_BOOT=1 -ExecStart=/etc/init.d/reboot -StandardOutput=tty -- cgit v1.2.3-54-g00ecf