From 675389f11ffaab590e9dedabc821e33745e3eb5c Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 14 Oct 2010 15:06:41 -0400 Subject: Reorganize the systemd bits as we'll have scripts to put in /lib/systemd. --- Makefile | 4 ++-- systemd/halt.service | 19 ------------------- systemd/killall.service | 19 ------------------- systemd/poweroff.service | 19 ------------------- systemd/prefdm.service | 22 ---------------------- systemd/rc-local.service | 16 ---------------- systemd/reboot.service | 19 ------------------- systemd/single.service | 29 ----------------------------- systemd/sysinit.service | 19 ------------------- systemd/system/halt.service | 19 +++++++++++++++++++ systemd/system/killall.service | 19 +++++++++++++++++++ systemd/system/poweroff.service | 19 +++++++++++++++++++ systemd/system/prefdm.service | 22 ++++++++++++++++++++++ systemd/system/rc-local.service | 16 ++++++++++++++++ systemd/system/reboot.service | 19 +++++++++++++++++++ systemd/system/single.service | 29 +++++++++++++++++++++++++++++ systemd/system/sysinit.service | 19 +++++++++++++++++++ 17 files changed, 164 insertions(+), 164 deletions(-) delete mode 100644 systemd/halt.service delete mode 100644 systemd/killall.service delete mode 100644 systemd/poweroff.service delete mode 100644 systemd/prefdm.service delete mode 100644 systemd/rc-local.service delete mode 100644 systemd/reboot.service delete mode 100644 systemd/single.service delete mode 100644 systemd/sysinit.service create mode 100644 systemd/system/halt.service create mode 100644 systemd/system/killall.service create mode 100644 systemd/system/poweroff.service create mode 100644 systemd/system/prefdm.service create mode 100644 systemd/system/rc-local.service create mode 100644 systemd/system/reboot.service create mode 100644 systemd/system/single.service create mode 100644 systemd/system/sysinit.service diff --git a/Makefile b/Makefile index e54651b6..6877c79f 100644 --- a/Makefile +++ b/Makefile @@ -48,8 +48,8 @@ install: install -m644 sysconfig/debug sysconfig/init sysconfig/netconsole sysconfig/readonly-root $(ROOT)/etc/sysconfig/ cp -af sysconfig/network-scripts $(ROOT)/etc/sysconfig/ cp -af ppp NetworkManager init $(ROOT)/etc - mkdir -p $(ROOT)/lib/systemd/system - cp -af systemd/* $(ROOT)/lib/systemd/system + mkdir -p $(ROOT)/lib/systemd/ + cp -af systemd/* $(ROOT)/lib/systemd/ mkdir -p $(ROOT)/etc/ppp/peers mkdir -p $(ROOT)/lib cp -af udev $(ROOT)/lib diff --git a/systemd/halt.service b/systemd/halt.service deleted file mode 100644 index a1c0e84f..00000000 --- a/systemd/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 the system -DefaultDependencies=no -Requires=umount.target killall.service -After=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/systemd/killall.service b/systemd/killall.service deleted file mode 100644 index 953dc19d..00000000 --- a/systemd/killall.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=Kill all processes -DefaultDependencies=no -Requires=shutdown.target -After=shutdown.target -RefuseManualStart=yes - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=-/etc/init.d/killall start -StandardOutput=tty diff --git a/systemd/poweroff.service b/systemd/poweroff.service deleted file mode 100644 index 28b4a5f4..00000000 --- a/systemd/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 down the system -DefaultDependencies=no -Requires=umount.target killall.service -After=umount.target killall.service - -[Service] -Type=oneshot -RemainAfterExit=yes -Environment=RUNLEVEL=0 -ExecStart=/etc/init.d/halt start -StandardOutput=tty diff --git a/systemd/prefdm.service b/systemd/prefdm.service deleted file mode 100644 index 60a5ed05..00000000 --- a/systemd/prefdm.service +++ /dev/null @@ -1,22 +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=Display Manager -After=syslog.target livesys-late.service rc-local.service - -# On Fedora gdm/X11 is on tty1. We explicitly cancel the getty here to -# avoid any races around that. -Conflicts=getty@tty1.service plymouth-quit.service - -[Service] -ExecStart=/etc/X11/prefdm -nodaemon -Restart=restart-always -RestartSec=0 - -[Install] -Alias=display-manager.service diff --git a/systemd/rc-local.service b/systemd/rc-local.service deleted file mode 100644 index 21ecfb23..00000000 --- a/systemd/rc-local.service +++ /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 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=Local customization - -[Service] -ExecStart=/etc/rc.local start -TimeoutSec=0 -StandardOutput=tty -RemainAfterExit=yes -SysVStartPriority=99 diff --git a/systemd/reboot.service b/systemd/reboot.service deleted file mode 100644 index 622beb58..00000000 --- a/systemd/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 the system -DefaultDependencies=no -Requires=umount.target killall.service -After=umount.target killall.service - -[Service] -Type=oneshot -RemainAfterExit=yes -Environment=RUNLEVEL=6 -ExecStart=/etc/init.d/reboot start -StandardOutput=tty diff --git a/systemd/single.service b/systemd/single.service deleted file mode 100644 index d91166b3..00000000 --- a/systemd/single.service +++ /dev/null @@ -1,29 +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. - -# See systemd.special(7) for details - -[Unit] -Description=Rescue Shell -DefaultDependencies=no -Conflicts=multi-user.target shutdown.target -After=sysinit.target -Before=multi-user.target - -[Service] -Type=simple -EnvironmentFile=/etc/sysconfig/init -Environment=HOME=/root -ExecStartPre=-/bin/plymouth --hide-splash -ExecStart=-/bin/bash -c "exec $SINGLE" -ExecStopPost=/bin/systemctl default -StandardInput=tty-force -KillMode=process-group - -# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash -# terminates cleanly. -KillSignal=SIGHUP diff --git a/systemd/sysinit.service b/systemd/sysinit.service deleted file mode 100644 index 860d3a34..00000000 --- a/systemd/sysinit.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=System Initialization -DefaultDependencies=no -Conflicts=shutdown.target -Before=shutdown.target emergency.service emergency.target - -[Service] -ExecStart=/etc/rc.d/rc.sysinit -Type=forking -TimeoutSec=0 -StandardInput=tty -RemainAfterExit=yes diff --git a/systemd/system/halt.service b/systemd/system/halt.service new file mode 100644 index 00000000..a1c0e84f --- /dev/null +++ b/systemd/system/halt.service @@ -0,0 +1,19 @@ +# 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 the system +DefaultDependencies=no +Requires=umount.target killall.service +After=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/systemd/system/killall.service b/systemd/system/killall.service new file mode 100644 index 00000000..953dc19d --- /dev/null +++ b/systemd/system/killall.service @@ -0,0 +1,19 @@ +# 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 +Requires=shutdown.target +After=shutdown.target +RefuseManualStart=yes + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=-/etc/init.d/killall start +StandardOutput=tty diff --git a/systemd/system/poweroff.service b/systemd/system/poweroff.service new file mode 100644 index 00000000..28b4a5f4 --- /dev/null +++ b/systemd/system/poweroff.service @@ -0,0 +1,19 @@ +# 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 down the system +DefaultDependencies=no +Requires=umount.target killall.service +After=umount.target killall.service + +[Service] +Type=oneshot +RemainAfterExit=yes +Environment=RUNLEVEL=0 +ExecStart=/etc/init.d/halt start +StandardOutput=tty diff --git a/systemd/system/prefdm.service b/systemd/system/prefdm.service new file mode 100644 index 00000000..60a5ed05 --- /dev/null +++ b/systemd/system/prefdm.service @@ -0,0 +1,22 @@ +# 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=Display Manager +After=syslog.target livesys-late.service rc-local.service + +# On Fedora gdm/X11 is on tty1. We explicitly cancel the getty here to +# avoid any races around that. +Conflicts=getty@tty1.service plymouth-quit.service + +[Service] +ExecStart=/etc/X11/prefdm -nodaemon +Restart=restart-always +RestartSec=0 + +[Install] +Alias=display-manager.service diff --git a/systemd/system/rc-local.service b/systemd/system/rc-local.service new file mode 100644 index 00000000..21ecfb23 --- /dev/null +++ b/systemd/system/rc-local.service @@ -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=Local customization + +[Service] +ExecStart=/etc/rc.local start +TimeoutSec=0 +StandardOutput=tty +RemainAfterExit=yes +SysVStartPriority=99 diff --git a/systemd/system/reboot.service b/systemd/system/reboot.service new file mode 100644 index 00000000..622beb58 --- /dev/null +++ b/systemd/system/reboot.service @@ -0,0 +1,19 @@ +# 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 the system +DefaultDependencies=no +Requires=umount.target killall.service +After=umount.target killall.service + +[Service] +Type=oneshot +RemainAfterExit=yes +Environment=RUNLEVEL=6 +ExecStart=/etc/init.d/reboot start +StandardOutput=tty diff --git a/systemd/system/single.service b/systemd/system/single.service new file mode 100644 index 00000000..d91166b3 --- /dev/null +++ b/systemd/system/single.service @@ -0,0 +1,29 @@ +# 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=Rescue Shell +DefaultDependencies=no +Conflicts=multi-user.target shutdown.target +After=sysinit.target +Before=multi-user.target + +[Service] +Type=simple +EnvironmentFile=/etc/sysconfig/init +Environment=HOME=/root +ExecStartPre=-/bin/plymouth --hide-splash +ExecStart=-/bin/bash -c "exec $SINGLE" +ExecStopPost=/bin/systemctl default +StandardInput=tty-force +KillMode=process-group + +# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash +# terminates cleanly. +KillSignal=SIGHUP diff --git a/systemd/system/sysinit.service b/systemd/system/sysinit.service new file mode 100644 index 00000000..860d3a34 --- /dev/null +++ b/systemd/system/sysinit.service @@ -0,0 +1,19 @@ +# 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=System Initialization +DefaultDependencies=no +Conflicts=shutdown.target +Before=shutdown.target emergency.service emergency.target + +[Service] +ExecStart=/etc/rc.d/rc.sysinit +Type=forking +TimeoutSec=0 +StandardInput=tty +RemainAfterExit=yes -- cgit v1.2.1