mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
units: get rid of distro-specific shutdown scripts, replace them by systemd-shutdown invocations
This commit is contained in:
parent
d48141ba0b
commit
46574a5b4a
26
Makefile.am
26
Makefile.am
@ -231,6 +231,9 @@ nodist_systemunit_DATA = \
|
|||||||
units/systemd-tmpfiles.service \
|
units/systemd-tmpfiles.service \
|
||||||
units/systemd-user-sessions.service \
|
units/systemd-user-sessions.service \
|
||||||
units/syslog.target \
|
units/syslog.target \
|
||||||
|
units/halt.service \
|
||||||
|
units/poweroff.service \
|
||||||
|
units/reboot.service \
|
||||||
units/kexec.service
|
units/kexec.service
|
||||||
|
|
||||||
dist_sessionunit_DATA = \
|
dist_sessionunit_DATA = \
|
||||||
@ -265,18 +268,17 @@ EXTRA_DIST = \
|
|||||||
units/systemd-tmpfiles.service.in \
|
units/systemd-tmpfiles.service.in \
|
||||||
units/systemd-user-sessions.service.in \
|
units/systemd-user-sessions.service.in \
|
||||||
units/syslog.target.in \
|
units/syslog.target.in \
|
||||||
|
units/halt.service.in \
|
||||||
|
units/poweroff.service.in \
|
||||||
|
units/reboot.service.in \
|
||||||
units/kexec.service.in \
|
units/kexec.service.in \
|
||||||
units/session/exit.service.in \
|
units/session/exit.service.in \
|
||||||
systemd.pc.in
|
systemd.pc.in
|
||||||
|
|
||||||
if TARGET_FEDORA
|
if TARGET_FEDORA
|
||||||
dist_systemunit_DATA += \
|
dist_systemunit_DATA += \
|
||||||
units/fedora/halt.service \
|
|
||||||
units/fedora/killall.service \
|
|
||||||
units/fedora/poweroff.service \
|
|
||||||
units/fedora/prefdm.service \
|
units/fedora/prefdm.service \
|
||||||
units/fedora/rc-local.service \
|
units/fedora/rc-local.service \
|
||||||
units/fedora/reboot.service \
|
|
||||||
units/fedora/sysinit.service \
|
units/fedora/sysinit.service \
|
||||||
units/fedora/single.service \
|
units/fedora/single.service \
|
||||||
units/fedora/plymouth-quit.service \
|
units/fedora/plymouth-quit.service \
|
||||||
@ -287,10 +289,6 @@ endif
|
|||||||
|
|
||||||
if TARGET_DEBIAN
|
if TARGET_DEBIAN
|
||||||
dist_systemunit_DATA += \
|
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/fsck.target \
|
||||||
units/debian/umountfs.service \
|
units/debian/umountfs.service \
|
||||||
units/debian/umountnfs.service \
|
units/debian/umountnfs.service \
|
||||||
@ -299,28 +297,18 @@ endif
|
|||||||
|
|
||||||
if TARGET_SUSE
|
if TARGET_SUSE
|
||||||
dist_systemunit_DATA += \
|
dist_systemunit_DATA += \
|
||||||
units/suse/halt.service \
|
|
||||||
units/suse/poweroff.service \
|
|
||||||
units/suse/reboot.service \
|
|
||||||
units/suse/fsck.target
|
units/suse/fsck.target
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if TARGET_GENTOO
|
if TARGET_GENTOO
|
||||||
dist_systemunit_DATA += \
|
dist_systemunit_DATA += \
|
||||||
units/gentoo/halt.service \
|
|
||||||
units/gentoo/killall.service \
|
|
||||||
units/gentoo/poweroff.service \
|
|
||||||
units/gentoo/reboot.service \
|
|
||||||
units/gentoo/xdm.service
|
units/gentoo/xdm.service
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if TARGET_ARCH
|
if TARGET_ARCH
|
||||||
dist_systemunit_DATA += \
|
dist_systemunit_DATA += \
|
||||||
units/arch/sysinit.service \
|
units/arch/sysinit.service \
|
||||||
units/arch/rc-local.service \
|
units/arch/rc-local.service
|
||||||
units/arch/halt.service \
|
|
||||||
units/arch/poweroff.service \
|
|
||||||
units/arch/reboot.service
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
dist_doc_DATA = \
|
dist_doc_DATA = \
|
||||||
|
3
units/.gitignore
vendored
3
units/.gitignore
vendored
@ -1,3 +1,6 @@
|
|||||||
|
halt.service
|
||||||
|
poweroff.service
|
||||||
|
reboot.service
|
||||||
kexec.service
|
kexec.service
|
||||||
systemd-user-sessions.service
|
systemd-user-sessions.service
|
||||||
systemd-readahead-done.service
|
systemd-readahead-done.service
|
||||||
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -13,7 +13,4 @@ After=shutdown.target umount.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
ExecStart=@SYSTEMCTL@ --force halt
|
||||||
Environment=RUNLEVEL=0
|
|
||||||
ExecStart=/etc/rc.shutdown
|
|
||||||
StandardOutput=tty
|
|
@ -13,7 +13,4 @@ After=shutdown.target umount.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
ExecStart=@SYSTEMCTL@ --force poweroff
|
||||||
Environment=RUNLEVEL=0
|
|
||||||
ExecStart=/etc/rc.shutdown
|
|
||||||
StandardOutput=tty
|
|
@ -13,7 +13,4 @@ After=shutdown.target umount.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
ExecStart=@SYSTEMCTL@ --force reboot
|
||||||
Environment=RUNLEVEL=6
|
|
||||||
ExecStart=/etc/rc.shutdown
|
|
||||||
StandardOutput=tty
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
Loading…
Reference in New Issue
Block a user