From 59b2f505ea603ef65823615711b5adfa87795f41 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 15 Oct 2010 16:25:31 -0400 Subject: Add split-out bits of rc.sysinit and associated service files. Remove sysinit.service. Based on work by Harald Hoyer () sysinit-hack/unhack will be removed once the net hotplug stuff is fixed to not require this. --- systemd/system/fedora-cleanup.service | 13 +++++++++++++ systemd/system/fedora-configure.service | 13 +++++++++++++ systemd/system/fedora-init-crypto-1.service | 14 ++++++++++++++ systemd/system/fedora-init-crypto-2.service | 14 ++++++++++++++ systemd/system/fedora-init-crypto-3.service | 14 ++++++++++++++ systemd/system/fedora-loadmodules.service | 15 +++++++++++++++ systemd/system/fedora-mountall.service | 14 ++++++++++++++ systemd/system/fedora-readonly.service | 14 ++++++++++++++ systemd/system/fedora-storage-init.service | 13 +++++++++++++ systemd/system/fedora-swapon.service | 13 +++++++++++++ systemd/system/fedora-sysinit-hack.service | 10 ++++++++++ systemd/system/fedora-sysinit-unhack.service | 10 ++++++++++ systemd/system/fedora-wait-storage.service | 15 +++++++++++++++ systemd/system/single.service | 2 +- systemd/system/sysinit.service | 19 ------------------- 15 files changed, 173 insertions(+), 20 deletions(-) create mode 100644 systemd/system/fedora-cleanup.service create mode 100644 systemd/system/fedora-configure.service create mode 100644 systemd/system/fedora-init-crypto-1.service create mode 100644 systemd/system/fedora-init-crypto-2.service create mode 100644 systemd/system/fedora-init-crypto-3.service create mode 100644 systemd/system/fedora-loadmodules.service create mode 100644 systemd/system/fedora-mountall.service create mode 100644 systemd/system/fedora-readonly.service create mode 100644 systemd/system/fedora-storage-init.service create mode 100644 systemd/system/fedora-swapon.service create mode 100644 systemd/system/fedora-sysinit-hack.service create mode 100644 systemd/system/fedora-sysinit-unhack.service create mode 100644 systemd/system/fedora-wait-storage.service delete mode 100644 systemd/system/sysinit.service (limited to 'systemd/system') diff --git a/systemd/system/fedora-cleanup.service b/systemd/system/fedora-cleanup.service new file mode 100644 index 00000000..127fab64 --- /dev/null +++ b/systemd/system/fedora-cleanup.service @@ -0,0 +1,13 @@ +[Unit] +Description=Clean out assorted temporary files +DefaultDependencies=no +Conflicts=shutdown.target +Before=shutdown.target emergency.service emergency.target +After=fedora-mountall.service fedora-readonly.service +Requires=fedora-mountall.service + +[Service] +ExecStart=/lib/systemd/fedora-cleanup +Type=oneshot +TimeoutSec=0 +RemainAfterExit=yes diff --git a/systemd/system/fedora-configure.service b/systemd/system/fedora-configure.service new file mode 100644 index 00000000..032e94ae --- /dev/null +++ b/systemd/system/fedora-configure.service @@ -0,0 +1,13 @@ +[Unit] +Description=Reconfigure the system on administrator request +DefaultDependencies=no +Conflicts=multi-user.target shutdown.target +Before=multi-user.target shutdown.target +After=local-fs.target + +[Service] +ExecStart=/lib/systemd/fedora-configure +Type=oneshot +TimeoutSec=0 +StandardInput=tty +RemainAfterExit=yes diff --git a/systemd/system/fedora-init-crypto-1.service b/systemd/system/fedora-init-crypto-1.service new file mode 100644 index 00000000..fee6bcce --- /dev/null +++ b/systemd/system/fedora-init-crypto-1.service @@ -0,0 +1,14 @@ +[Unit] +Description=Initialize encrypted storage +DefaultDependencies=no +Conflicts=shutdown.target +Before=shutdown.target emergency.service emergency.target +After=fedora-wait-storage.service +Requires=fedora-wait-storage.service + +[Service] +ExecStart=/lib/systemd/fedora-init-crypto 0 +Type=oneshot +TimeoutSec=0 +RemainAfterExit=yes +StandardInput=tty diff --git a/systemd/system/fedora-init-crypto-2.service b/systemd/system/fedora-init-crypto-2.service new file mode 100644 index 00000000..2fc128eb --- /dev/null +++ b/systemd/system/fedora-init-crypto-2.service @@ -0,0 +1,14 @@ +[Unit] +Description=Initialize encrypted filesystems on top of other storage +DefaultDependencies=no +Conflicts=shutdown.target +Before=shutdown.target emergency.service emergency.target +After=fedora-storage-init.service +Requires=fedora-storage-init.service + +[Service] +ExecStart=/lib/systemd/fedora-init-crypto 0 +Type=oneshot +TimeoutSec=0 +RemainAfterExit=yes +StandardInput=tty diff --git a/systemd/system/fedora-init-crypto-3.service b/systemd/system/fedora-init-crypto-3.service new file mode 100644 index 00000000..08d3bf96 --- /dev/null +++ b/systemd/system/fedora-init-crypto-3.service @@ -0,0 +1,14 @@ +[Unit] +Description=Initialize encrypted filesystems on top of other storage +DefaultDependencies=no +Conflicts=shutdown.target +Before=shutdown.target emergency.service emergency.target +After=systemd-random-seed-load.service +Requires=systemd-random-seed-load.service + +[Service] +ExecStart=/lib/systemd/fedora-init-crypto 1 +Type=oneshot +TimeoutSec=0 +RemainAfterExit=yes +StandardInput=tty diff --git a/systemd/system/fedora-loadmodules.service b/systemd/system/fedora-loadmodules.service new file mode 100644 index 00000000..aac773b8 --- /dev/null +++ b/systemd/system/fedora-loadmodules.service @@ -0,0 +1,15 @@ +[Unit] +Description=Load legacy module configuration +DefaultDependencies=no +Conflicts=shutdown.target +Before=basic.target shutdown.target emergency.service emergency.target +#Conflicts=sysinit.service +After=udev.service +Requires=udev.service + +[Service] +ExecStart=/lib/systemd/fedora-loadmodules +Type=oneshot +TimeoutSec=0 +RemainAfterExit=yes + diff --git a/systemd/system/fedora-mountall.service b/systemd/system/fedora-mountall.service new file mode 100644 index 00000000..af5cf79b --- /dev/null +++ b/systemd/system/fedora-mountall.service @@ -0,0 +1,14 @@ +[Unit] +Description=Check, mount, and relabel all filesystems +DefaultDependencies=no +Conflicts=shutdown.target +Before=shutdown.target emergency.service emergency.target remount-rootfs.service +After=fedora-storage-init.service fedora-init-crypto-2.service +Requires=fedora-storage-init.service fedora-init-crypto-2.service + +[Service] +ExecStart=/lib/systemd/fedora-mountall +Type=oneshot +TimeoutSec=0 +RemainAfterExit=yes +StandardInput=tty diff --git a/systemd/system/fedora-readonly.service b/systemd/system/fedora-readonly.service new file mode 100644 index 00000000..c1e42367 --- /dev/null +++ b/systemd/system/fedora-readonly.service @@ -0,0 +1,14 @@ +[Unit] +Description=Configure read-only root support +DefaultDependencies=no +Conflicts=shutdown.target +Before=shutdown.target emergency.service emergency.target fedora-cleanup.service +After=fedora-mountall.service +Requires=fedora-mountall.service + +[Service] +ExecStart=/lib/systemd/fedora-readonly +Type=oneshot +TimeoutSec=0 +StandardInput=tty +RemainAfterExit=yes diff --git a/systemd/system/fedora-storage-init.service b/systemd/system/fedora-storage-init.service new file mode 100644 index 00000000..2806c2dd --- /dev/null +++ b/systemd/system/fedora-storage-init.service @@ -0,0 +1,13 @@ +[Unit] +Description=Initialize storage subsystems (RAID, LVM, etc.) +DefaultDependencies=no +Conflicts=shutdown.target +Before=shutdown.target local-fs.target emergency.service emergency.target +After=fedora-wait-storage.service fedora-init-crypto-1.service +Requires=fedora-wait-storage.service fedora-init-crypto-1.service + +[Service] +ExecStart=/lib/systemd/fedora-storage-init +Type=oneshot +TimeoutSec=0 +RemainAfterExit=yes diff --git a/systemd/system/fedora-swapon.service b/systemd/system/fedora-swapon.service new file mode 100644 index 00000000..4b945026 --- /dev/null +++ b/systemd/system/fedora-swapon.service @@ -0,0 +1,13 @@ +[Unit] +Description=Configure the system if the administrator requested it +DefaultDependencies=no +Conflicts=shutdown.target +Before=shutdown.target emergency.service emergency.target +After=fedora-mountall.service fedora-init-crypto-3.service +Requires=fedora-mountall.service fedora-init-crypto-3.service + +[Service] +ExecStart=/lib/systemd/fedora-swapon +Type=oneshot +TimeoutSec=0 +RemainAfterExit=yes diff --git a/systemd/system/fedora-sysinit-hack.service b/systemd/system/fedora-sysinit-hack.service new file mode 100644 index 00000000..dd78da80 --- /dev/null +++ b/systemd/system/fedora-sysinit-hack.service @@ -0,0 +1,10 @@ +[Unit] +Description=Bootup hack +DefaultDependencies=no +Conflicts=shutdown.target +Before=basic.target shutdown.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/bin/touch /dev/.in_sysinit diff --git a/systemd/system/fedora-sysinit-unhack.service b/systemd/system/fedora-sysinit-unhack.service new file mode 100644 index 00000000..86e20cd6 --- /dev/null +++ b/systemd/system/fedora-sysinit-unhack.service @@ -0,0 +1,10 @@ +[Unit] +Description=Bootup hack +DefaultDependencies=no +Conflicts=shutdown.target +Before=shutdown.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=-/bin/rm -f /dev/.in_sysinit diff --git a/systemd/system/fedora-wait-storage.service b/systemd/system/fedora-wait-storage.service new file mode 100644 index 00000000..63744b63 --- /dev/null +++ b/systemd/system/fedora-wait-storage.service @@ -0,0 +1,15 @@ +[Unit] +Description=Wait for storage scan +DefaultDependencies=no +Conflicts=shutdown.target +Before=local-fs.target shutdown.target emergency.service emergency.target +After=udev-settle.service +Requires=udev.service udev-settle.service + +[Service] +ExecStart=-/sbin/rmmod scsi_wait_scan +ExecStart=-/sbin/modprobe scsi_wait_scan +ExecStart=-/sbin/rmmod scsi_wait_scan +Type=oneshot +TimeoutSec=0 +RemainAfterExit=yes diff --git a/systemd/system/single.service b/systemd/system/single.service index d91166b3..4264cd56 100644 --- a/systemd/system/single.service +++ b/systemd/system/single.service @@ -11,7 +11,7 @@ Description=Rescue Shell DefaultDependencies=no Conflicts=multi-user.target shutdown.target -After=sysinit.target +After=basic.target Before=multi-user.target [Service] diff --git a/systemd/system/sysinit.service b/systemd/system/sysinit.service deleted file mode 100644 index 860d3a34..00000000 --- a/systemd/system/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 -- cgit v1.2.1