]> err.no Git - systemd/commitdiff
units: get rid of distro-specific shutdown scripts, replace them by systemd-shutdown...
authorLennart Poettering <lennart@poettering.net>
Thu, 14 Oct 2010 00:58:37 +0000 (02:58 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 14 Oct 2010 00:58:37 +0000 (02:58 +0200)
20 files changed:
Makefile.am
units/.gitignore
units/debian/halt.service [deleted file]
units/debian/killall.service [deleted file]
units/debian/poweroff.service [deleted file]
units/debian/reboot.service [deleted file]
units/fedora/halt.service [deleted file]
units/fedora/killall.service [deleted file]
units/fedora/poweroff.service [deleted file]
units/fedora/reboot.service [deleted file]
units/gentoo/halt.service [deleted file]
units/gentoo/killall.service [deleted file]
units/gentoo/poweroff.service [deleted file]
units/gentoo/reboot.service [deleted file]
units/halt.service.in [moved from units/arch/halt.service with 82% similarity]
units/poweroff.service.in [moved from units/arch/poweroff.service with 82% similarity]
units/reboot.service.in [moved from units/arch/reboot.service with 82% similarity]
units/suse/halt.service [deleted file]
units/suse/poweroff.service [deleted file]
units/suse/reboot.service [deleted file]

index b15cb123bef3e444fcda02a48910b057cbe33324..8b2248f1f767fb415291f1f02e3c3255f28eee02 100644 (file)
@@ -231,6 +231,9 @@ nodist_systemunit_DATA = \
        units/systemd-tmpfiles.service \
        units/systemd-user-sessions.service \
        units/syslog.target \
+       units/halt.service \
+       units/poweroff.service \
+       units/reboot.service \
        units/kexec.service
 
 dist_sessionunit_DATA = \
@@ -265,18 +268,17 @@ EXTRA_DIST = \
        units/systemd-tmpfiles.service.in \
        units/systemd-user-sessions.service.in \
        units/syslog.target.in \
+       units/halt.service.in \
+       units/poweroff.service.in \
+       units/reboot.service.in \
        units/kexec.service.in \
        units/session/exit.service.in \
        systemd.pc.in
 
 if TARGET_FEDORA
 dist_systemunit_DATA += \
-       units/fedora/halt.service \
-       units/fedora/killall.service \
-       units/fedora/poweroff.service \
        units/fedora/prefdm.service \
        units/fedora/rc-local.service \
-       units/fedora/reboot.service \
        units/fedora/sysinit.service \
        units/fedora/single.service \
        units/fedora/plymouth-quit.service \
@@ -287,10 +289,6 @@ endif
 
 if TARGET_DEBIAN
 dist_systemunit_DATA += \
-       units/debian/halt.service \
-       units/debian/killall.service \
-       units/debian/poweroff.service \
-       units/debian/reboot.service \
        units/debian/fsck.target \
        units/debian/umountfs.service \
        units/debian/umountnfs.service \
@@ -299,28 +297,18 @@ endif
 
 if TARGET_SUSE
 dist_systemunit_DATA += \
-       units/suse/halt.service \
-       units/suse/poweroff.service \
-       units/suse/reboot.service \
        units/suse/fsck.target
 endif
 
 if TARGET_GENTOO
 dist_systemunit_DATA += \
-       units/gentoo/halt.service \
-       units/gentoo/killall.service \
-       units/gentoo/poweroff.service \
-       units/gentoo/reboot.service \
        units/gentoo/xdm.service
 endif
 
 if TARGET_ARCH
 dist_systemunit_DATA += \
        units/arch/sysinit.service \
-       units/arch/rc-local.service \
-       units/arch/halt.service \
-       units/arch/poweroff.service \
-       units/arch/reboot.service
+       units/arch/rc-local.service
 endif
 
 dist_doc_DATA = \
index 83fc32cfd9bc560e909efdc2f4dc9f7b116b01c8..77d7e286909f4e52e60b4a4c90690371ec2d1a3e 100644 (file)
@@ -1,3 +1,6 @@
+halt.service
+poweroff.service
+reboot.service
 kexec.service
 systemd-user-sessions.service
 systemd-readahead-done.service
diff --git a/units/debian/halt.service b/units/debian/halt.service
deleted file mode 100644 (file)
index 96061be..0000000
+++ /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 (file)
index b7ed11a..0000000
+++ /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 (file)
index 34a6683..0000000
+++ /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 (file)
index 99f259e..0000000
+++ /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 (file)
index c337dce..0000000
+++ /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 (file)
index b81b6a8..0000000
+++ /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 (file)
index dbbed75..0000000
+++ /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 (file)
index ca8b3b1..0000000
+++ /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 (file)
index d97b942..0000000
+++ /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 (file)
index de994d1..0000000
+++ /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 (file)
index 2483f94..0000000
+++ /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 (file)
index 8f8d732..0000000
+++ /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
similarity index 82%
rename from units/arch/halt.service
rename to units/halt.service.in
index 2079bc025c5142df76a61343db41e9348fef482f..730c4c2955a8c2dd00a33c97ca90ca26beadef09 100644 (file)
@@ -13,7 +13,4 @@ After=shutdown.target umount.target
 
 [Service]
 Type=oneshot
-RemainAfterExit=yes
-Environment=RUNLEVEL=0
-ExecStart=/etc/rc.shutdown
-StandardOutput=tty
+ExecStart=@SYSTEMCTL@ --force halt
similarity index 82%
rename from units/arch/poweroff.service
rename to units/poweroff.service.in
index df2812fd9b6119f5a5579eb7c2b63fdb2457425c..da66f8efced3b8e6b1e0a2bfd4848ae0f5437682 100644 (file)
@@ -13,7 +13,4 @@ After=shutdown.target umount.target
 
 [Service]
 Type=oneshot
-RemainAfterExit=yes
-Environment=RUNLEVEL=0
-ExecStart=/etc/rc.shutdown
-StandardOutput=tty
+ExecStart=@SYSTEMCTL@ --force poweroff
similarity index 82%
rename from units/arch/reboot.service
rename to units/reboot.service.in
index ae5c979e3e7a65fbc05ca149690ec3a26ad2e89d..e5e666f2d7503b6f5a2c12083831e58f373daacb 100644 (file)
@@ -13,7 +13,4 @@ After=shutdown.target umount.target
 
 [Service]
 Type=oneshot
-RemainAfterExit=yes
-Environment=RUNLEVEL=6
-ExecStart=/etc/rc.shutdown
-StandardOutput=tty
+ExecStart=@SYSTEMCTL@ --force reboot
diff --git a/units/suse/halt.service b/units/suse/halt.service
deleted file mode 100644 (file)
index d826ca3..0000000
+++ /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 (file)
index fe8c677..0000000
+++ /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 (file)
index 001d136..0000000
+++ /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