diff options
Diffstat (limited to 'systemd')
28 files changed, 519 insertions, 162 deletions
diff --git a/systemd/fedora-autorelabel b/systemd/fedora-autorelabel new file mode 100755 index 00000000..f5e4db29 --- /dev/null +++ b/systemd/fedora-autorelabel @@ -0,0 +1,84 @@ +#!/bin/bash +# +# Do automatic relabelling +# + +. /etc/init.d/functions + +PLYMOUTH= +[ -x /usr/bin/plymouth ] && PLYMOUTH=yes + +# Check SELinux status +SELINUX_STATE= +if [ -e "/selinux/enforce" ] && [ "$(cat /proc/self/attr/current)" != "kernel" ]; then + if [ -r "/selinux/enforce" ] ; then + SELINUX_STATE=$(cat "/selinux/enforce") + else + # assume enforcing if you can't read it + SELINUX_STATE=1 + fi +fi + +disable_selinux() { + echo $"*** Warning -- SELinux is active" + echo $"*** Disabling security enforcement for system recovery." + echo $"*** Run 'setenforce 1' to reenable." + echo "0" > "/selinux/enforce" +} + +relabel_selinux() { + # if /sbin/init is not labeled correctly this process is running in the + # wrong context, so a reboot will be required after relabel + AUTORELABEL= + . /etc/selinux/config + echo "0" > /selinux/enforce + [ -n "$PLYMOUTH" ] && plymouth --hide-splash + + if [ "$AUTORELABEL" = "0" ]; then + echo + echo $"*** Warning -- SELinux ${SELINUXTYPE} policy relabel is required. " + echo $"*** /etc/selinux/config indicates you want to manually fix labeling" + echo $"*** problems. Dropping you to a shell; the system will reboot" + echo $"*** when you leave the shell." + sulogin + + else + echo + echo $"*** Warning -- SELinux ${SELINUXTYPE} policy relabel is required." + echo $"*** Relabeling could take a very long time, depending on file" + echo $"*** system size and speed of hard drives." + + /sbin/fixfiles -F restore > /dev/null 2>&1 + fi + rm -f /.autorelabel + echo $"Unmounting file systems" + umount -a + mount -n -o remount,ro / + echo $"Automatic reboot in progress." + reboot -f +} + +[ -z "${cmdline}" ] && cmdline=$(cat /proc/cmdline) + +# Clean up SELinux labels +if [ -n "$SELINUX_STATE" ]; then + restorecon /etc/mtab /etc/ld.so.cache /etc/blkid/blkid.tab /etc/resolv.conf >/dev/null 2>&1 +fi + +# If relabeling, relabel mount points. +if [ -n "$SELINUX_STATE" -a "$READONLY" != "yes" ]; then + if strstr "$cmdline" autorelabel || [ -f /.autorelabel ] ; then + restorecon $(awk '!/^#/ && $4 !~ /noauto/ && $2 ~ /^\// { print $2 }' /etc/fstab) >/dev/null 2>&1 + fi +fi + +# Check to see if a full relabel is needed +if [ -n "$SELINUX_STATE" -a "$READONLY" != "yes" ]; then + if strstr "$cmdline" autorelabel || [ -f /.autorelabel ] ; then + relabel_selinux + fi +else + if [ "$READONLY" != "yes" ] && [ -d /etc/selinux ]; then + [ -f /.autorelabel ] || touch /.autorelabel + fi +fi diff --git a/systemd/fedora-autoswap b/systemd/fedora-autoswap new file mode 100755 index 00000000..ea392909 --- /dev/null +++ b/systemd/fedora-autoswap @@ -0,0 +1,18 @@ +#!/bin/bash +# +# Support automatic swapon. +# + +. /etc/init.d/functions + +if [ "$AUTOSWAP" = "yes" ]; then + curswap=$(awk '/^\/dev/ { print $1 }' /proc/swaps | while read x; do get_numeric_dev dec $x ; echo -n " "; done) + swappartitions=$(blkid -t TYPE=swap -o device) + if [ x"$swappartitions" != x ]; then + for partition in $swappartitions ; do + [ ! -e $partition ] && continue + majmin=$(get_numeric_dev dec $partition) + echo $curswap | grep -qw "$majmin" || action $"Enabling local swap partitions: " swapon $partition + done + fi +fi diff --git a/systemd/fedora-configure b/systemd/fedora-configure new file mode 100755 index 00000000..e6779fed --- /dev/null +++ b/systemd/fedora-configure @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Configure machine if necessary. + +. /etc/init.d/functions + +if [ -x /usr/bin/plymouth ]; then + /usr/bin/plymouth quit +fi + +if [ -x /usr/sbin/firstboot ]; then + /usr/sbin/firstboot +fi + +# Reread in network configuration data. +if [ -f /etc/sysconfig/network ]; then + . /etc/sysconfig/network + + # Reset the hostname. + action $"Resetting hostname ${HOSTNAME}: " hostname ${HOSTNAME} +fi diff --git a/systemd/fedora-init-crypto b/systemd/fedora-init-crypto new file mode 100755 index 00000000..79d18beb --- /dev/null +++ b/systemd/fedora-init-crypto @@ -0,0 +1,5 @@ +#!/bin/sh + +. /etc/init.d/functions + +init_crypto $1 || : diff --git a/systemd/fedora-loadmodules b/systemd/fedora-loadmodules new file mode 100755 index 00000000..4fd167c4 --- /dev/null +++ b/systemd/fedora-loadmodules @@ -0,0 +1,11 @@ +#!/bin/bash + +# Load other user-defined modules +for file in /etc/sysconfig/modules/*.modules ; do + [ -x $file ] && $file +done + +# Load modules (for backward compatibility with VARs) +if [ -f /etc/rc.modules ]; then + /etc/rc.modules +fi diff --git a/systemd/fedora-readonly b/systemd/fedora-readonly new file mode 100755 index 00000000..70e57a62 --- /dev/null +++ b/systemd/fedora-readonly @@ -0,0 +1,167 @@ +#!/bin/bash +# +# Set up readonly-root support. +# + +. /etc/init.d/functions + +# Check SELinux status +SELINUX_STATE= +if [ -e "/selinux/enforce" ] && [ "$(cat /proc/self/attr/current)" != "kernel" ]; then + if [ -r "/selinux/enforce" ] ; then + SELINUX_STATE=$(cat "/selinux/enforce") + else + # assume enforcing if you can't read it + SELINUX_STATE=1 + fi +fi + +# Only read this once. +[ -z "${cmdline}" ] && cmdline=$(cat /proc/cmdline) + +READONLY= +if [ -f /etc/sysconfig/readonly-root ]; then + . /etc/sysconfig/readonly-root +fi +if strstr "$cmdline" readonlyroot ; then + READONLY=yes + [ -z "$RW_MOUNT" ] && RW_MOUNT=/var/lib/stateless/writable + [ -z "$STATE_MOUNT" ] && STATE_MOUNT=/var/lib/stateless/state +fi +if strstr "$cmdline" noreadonlyroot ; then + READONLY=no +fi + +if [ "$READONLY" = "yes" -o "$TEMPORARY_STATE" = "yes" ]; then + + mount_empty() { + if [ -e "$1" ]; then + echo "$1" | cpio -p -vd "$RW_MOUNT" &>/dev/null + mount -n --bind "$RW_MOUNT$1" "$1" + fi + } + + mount_dirs() { + if [ -e "$1" ]; then + mkdir -p "$RW_MOUNT$1" + find "$1" -type d -print0 | cpio -p -0vd "$RW_MOUNT" &>/dev/null + mount -n --bind "$RW_MOUNT$1" "$1" + fi + } + + mount_files() { + if [ -e "$1" ]; then + cp -a --parents "$1" "$RW_MOUNT" + mount -n --bind "$RW_MOUNT$1" "$1" + fi + } + + # Common mount options for scratch space regardless of + # type of backing store + mountopts= + + # Scan partitions for local scratch storage + rw_mount_dev=$(blkid -t LABEL="$RW_LABEL" -l -o device) + + # First try to mount scratch storage from /etc/fstab, then any + # partition with the proper label. If either succeeds, be sure + # to wipe the scratch storage clean. If both fail, then mount + # scratch storage via tmpfs. + if mount $mountopts "$RW_MOUNT" > /dev/null 2>&1 ; then + rm -rf "$RW_MOUNT" > /dev/null 2>&1 + elif [ x$rw_mount_dev != x ] && mount $rw_mount_dev $mountopts "$RW_MOUNT" > /dev/null 2>&1; then + rm -rf "$RW_MOUNT" > /dev/null 2>&1 + else + mount -n -t tmpfs $RW_OPTIONS $mountopts none "$RW_MOUNT" + fi + + for file in /etc/rwtab /etc/rwtab.d/* /dev/.initramfs/rwtab ; do + is_ignored_file "$file" && continue + [ -f $file ] && cat $file | while read type path ; do + case "$type" in + empty) + mount_empty $path + ;; + files) + mount_files $path + ;; + dirs) + mount_dirs $path + ;; + *) + ;; + esac + [ -n "$SELINUX_STATE" ] && [ -e "$path" ] && restorecon -R "$path" + done + done + + # Use any state passed by initramfs + [ -d /dev/.initramfs/state ] && cp -a /dev/.initramfs/state/* $RW_MOUNT + + # In theory there should be no more than one network interface active + # this early in the boot process -- the one we're booting from. + # Use the network address to set the hostname of the client. This + # must be done even if we have local storage. + ipaddr= + if [ "$HOSTNAME" = "localhost" -o "$HOSTNAME" = "localhost.localdomain" ]; then + ipaddr=$(ip addr show to 0.0.0.0/0 scope global | awk '/[[:space:]]inet / { print gensub("/.*","","g",$2) }') + for ip in $ipaddr ; do + HOSTNAME= + eval $(ipcalc -h $ipaddr 2>/dev/null) + [ -n "$HOSTNAME" ] && { hostname ${HOSTNAME} ; break; } + done + fi + + # Clients with read-only root filesystems may be provided with a + # place where they can place minimal amounts of persistent + # state. SSH keys or puppet certificates for example. + # + # Ideally we'll use puppet to manage the state directory and to + # create the bind mounts. However, until that's all ready this + # is sufficient to build a working system. + + # First try to mount persistent data from /etc/fstab, then any + # partition with the proper label, then fallback to NFS + state_mount_dev=$(blkid -t LABEL="$STATE_LABEL" -l -o device) + if mount $mountopts $STATE_OPTIONS "$STATE_MOUNT" > /dev/null 2>&1 ; then + /bin/true + elif [ x$state_mount_dev != x ] && mount $state_mount_dev $mountopts "$STATE_MOUNT" > /dev/null 2>&1; then + /bin/true + elif [ ! -z "$CLIENTSTATE" ]; then + # No local storage was found. Make a final attempt to find + # state on an NFS server. + + mount -t nfs $CLIENTSTATE/$HOSTNAME $STATE_MOUNT -o rw,nolock + fi + + if [ -w "$STATE_MOUNT" ]; then + + mount_state() { + if [ -e "$1" ]; then + [ ! -e "$STATE_MOUNT$1" ] && cp -a --parents "$1" "$STATE_MOUNT" + mount -n --bind "$STATE_MOUNT$1" "$1" + fi + } + + for file in /etc/statetab /etc/statetab.d/* ; do + is_ignored_file "$file" && continue + [ ! -f "$file" ] && continue + + if [ -f "$STATE_MOUNT/$file" ] ; then + mount -n --bind "$STATE_MOUNT/$file" "$file" + fi + + for path in $(grep -v "^#" "$file" 2>/dev/null); do + mount_state "$path" + [ -n "$SELINUX_STATE" ] && [ -e "$path" ] && restorecon -R "$path" + done + done + + if [ -f "$STATE_MOUNT/files" ] ; then + for path in $(grep -v "^#" "$STATE_MOUNT/files" 2>/dev/null); do + mount_state "$path" + [ -n "$SELINUX_STATE" ] && [ -e "$path" ] && restorecon -R "$path" + done + fi + fi +fi diff --git a/systemd/fedora-storage-init b/systemd/fedora-storage-init new file mode 100755 index 00000000..0e3a417e --- /dev/null +++ b/systemd/fedora-storage-init @@ -0,0 +1,40 @@ +#!/bin/bash +# +# Storage initialization + +. /etc/init.d/functions + +[ -z "${cmdline}" ] && cmdline=$(cat /proc/cmdline) + +if ! strstr "$cmdline" nompath && [ -f /etc/multipath.conf ] && \ + [ -x /sbin/multipath ]; then + modprobe dm-multipath > /dev/null 2>&1 + /sbin/multipath -v 0 + if [ -x /sbin/kpartx ]; then + /sbin/dmsetup ls --target multipath --exec "/sbin/kpartx -a -p p" >/dev/null + fi +fi + +if ! strstr "$cmdline" nodmraid && [ -x /sbin/dmraid ]; then + modprobe dm-mirror >/dev/null 2>&1 + dmraidsets=$(LC_ALL=C /sbin/dmraid -s -c -i) + if [ "$?" = "0" ]; then + for dmname in $dmraidsets; do + if [[ "$dmname" == isw_* ]] && \ + ! strstr "$cmdline" noiswmd; then + continue + fi + /sbin/dmraid -ay -i --rm_partitions -p "$dmname" >/dev/null 2>&1 + /sbin/kpartx -a -p p "/dev/mapper/$dmname" + done + fi +fi + +# Start any MD RAID arrays that haven't been started yet +[ -r /proc/mdstat -a -r /dev/md/md-device-map ] && /sbin/mdadm -IRs + +if [ -x /sbin/lvm ]; then + action $"Setting up Logical Volume Management:" /sbin/lvm vgchange -a y --sysinit +fi + +[ -f /etc/crypttab ] && init_crypto 0 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 2e2396d7..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=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/fedora-autorelabel.service b/systemd/system/fedora-autorelabel.service new file mode 100644 index 00000000..bca3f956 --- /dev/null +++ b/systemd/system/fedora-autorelabel.service @@ -0,0 +1,14 @@ +[Unit] +Description=Relabel all filesystems, if necessary +DefaultDependencies=no +Conflicts=shutdown.target +Before=shutdown.target emergency.service emergency.target +After=local-fs.target +Requires=remount-rootfs.service local-fs.target + +[Service] +ExecStart=/lib/systemd/fedora-autorelabel +Type=oneshot +TimeoutSec=0 +RemainAfterExit=yes +StandardInput=tty diff --git a/systemd/system/fedora-autoswap.service b/systemd/system/fedora-autoswap.service new file mode 100644 index 00000000..8cd881d9 --- /dev/null +++ b/systemd/system/fedora-autoswap.service @@ -0,0 +1,13 @@ +[Unit] +Description=Enable all detected swap partitions +DefaultDependencies=no +Conflicts=shutdown.target +Before=shutdown.target emergency.service emergency.target +After=local-fs.target fedora-init-crypto-3.service +Requires=local-fs.target fedora-init-crypto-3.service + +[Service] +ExecStart=/lib/systemd/fedora-autoswap +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..f463c98b --- /dev/null +++ b/systemd/system/fedora-configure.service @@ -0,0 +1,15 @@ +[Unit] +Description=Reconfigure the system on administrator request +DefaultDependencies=no +Conflicts=shutdown.target +Before=multi-user.target shutdown.target +After=local-fs.target +ConditionPathExists=/.unconfigured + +[Service] +ExecStart=/lib/systemd/fedora-configure +ExecStopPost=rm -f /.unconfigured +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..6d6b732f --- /dev/null +++ b/systemd/system/fedora-init-crypto-1.service @@ -0,0 +1,15 @@ +[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 +ConditionPathExists=/etc/crypttab + +[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..c01bbd1b --- /dev/null +++ b/systemd/system/fedora-init-crypto-2.service @@ -0,0 +1,15 @@ +[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 +ConditionPathExists=/etc/crypttab + +[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..84b11fd5 --- /dev/null +++ b/systemd/system/fedora-init-crypto-3.service @@ -0,0 +1,15 @@ +[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 +ConditionPathExists=/etc/crypttab + +[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-readonly.service b/systemd/system/fedora-readonly.service new file mode 100644 index 00000000..eca197f0 --- /dev/null +++ b/systemd/system/fedora-readonly.service @@ -0,0 +1,13 @@ +[Unit] +Description=Configure read-only root support +DefaultDependencies=no +Conflicts=shutdown.target +Before=shutdown.target emergency.service emergency.target systemd-tmpfiles-setup.service +After=remount-rootfs.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-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/sysinit.service b/systemd/system/sysinit.service new file mode 100644 index 00000000..54e9ffac --- /dev/null +++ b/systemd/system/sysinit.service @@ -0,0 +1,10 @@ +[Unit] +Description=System initialization placeholder +DefaultDependencies=no +Conflicts=shutdown.target +Before=shutdown.target emergency.service emergency.target + +[Service] +ExecStart=/bin/true +Type=oneshot +RemainAfterExit=yes |