aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile19
-rw-r--r--initscripts.spec39
-rwxr-xr-xrc.d/rc.sysinit9
-rwxr-xr-xsystemd/fedora-autorelabel84
-rwxr-xr-xsystemd/fedora-autoswap18
-rwxr-xr-xsystemd/fedora-configure21
-rwxr-xr-xsystemd/fedora-init-crypto5
-rwxr-xr-xsystemd/fedora-loadmodules11
-rwxr-xr-xsystemd/fedora-readonly167
-rwxr-xr-xsystemd/fedora-storage-init40
-rw-r--r--systemd/halt.service19
-rw-r--r--systemd/killall.service19
-rw-r--r--systemd/poweroff.service19
-rw-r--r--systemd/prefdm.service22
-rw-r--r--systemd/rc-local.service16
-rw-r--r--systemd/reboot.service19
-rw-r--r--systemd/single.service29
-rw-r--r--systemd/sysinit.service19
-rw-r--r--systemd/system/fedora-autorelabel.service14
-rw-r--r--systemd/system/fedora-autoswap.service13
-rw-r--r--systemd/system/fedora-configure.service15
-rw-r--r--systemd/system/fedora-init-crypto-1.service15
-rw-r--r--systemd/system/fedora-init-crypto-2.service15
-rw-r--r--systemd/system/fedora-init-crypto-3.service15
-rw-r--r--systemd/system/fedora-loadmodules.service15
-rw-r--r--systemd/system/fedora-readonly.service13
-rw-r--r--systemd/system/fedora-storage-init.service13
-rw-r--r--systemd/system/fedora-sysinit-hack.service10
-rw-r--r--systemd/system/fedora-sysinit-unhack.service10
-rw-r--r--systemd/system/fedora-wait-storage.service15
-rw-r--r--systemd/system/sysinit.service10
-rw-r--r--udev/rules.d/60-net.rules1
32 files changed, 570 insertions, 179 deletions
diff --git a/Makefile b/Makefile
index bbcd7775..4ae07556 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
@@ -118,10 +118,18 @@ install:
mkdir -p -m 755 $(ROOT)/lib/systemd/system/multi-user.target.wants
mkdir -p -m 755 $(ROOT)/lib/systemd/system/graphical.target.wants
- ln -s prefdm.service $(ROOT)/lib/systemd/system/display-manager.service
ln -s reboot.target $(ROOT)/lib/systemd/system/ctrl-alt-del.target
- ln -s ../rc-local.service $(ROOT)/lib/systemd/system/multi-user.target.wants
- ln -s ../display-manager.service $(ROOT)/lib/systemd/system/graphical.target.wants
+ mkdir -p -m 755 $(ROOT)/lib/systemd/system/local-fs.target.wants
+ mkdir -p -m 755 $(ROOT)/lib/systemd/system/basic.target.wants
+ mkdir -p -m 755 $(ROOT)/lib/systemd/system/sysinit.target.wants
+ ln -s ../fedora-configure.service $(ROOT)/lib/systemd/system/basic.target.wants
+ ln -s ../fedora-loadmodules.service $(ROOT)/lib/systemd/system/basic.target.wants
+ ln -s ../fedora-autoswap.service $(ROOT)/lib/systemd/system/basic.target.wants
+ ln -s ../fedora-autorelabel.service $(ROOT)/lib/systemd/system/basic.target.wants
+ ln -s ../fedora-sysinit-hack.service $(ROOT)/lib/systemd/system/basic.target.wants
+ ln -s ../fedora-readonly.service $(ROOT)/lib/systemd/system/local-fs.target.wants
+ ln -s ../fedora-storage-init.service $(ROOT)/lib/systemd/system/local-fs.target.wants
+ ln -s ../fedora-sysinit-unhack.service $(ROOT)/lib/systemd/system/multi-user.target.wants
# These are LSB compatibility symlinks. At some point in the future
# the actual files will be here instead of symlinks
@@ -169,4 +177,3 @@ archive: clean syntax-check tag changelog
@sha1sum initscripts-$(VERSION).tar.bz2 > initscripts-$(VERSION).sha1sum
@scp initscripts-$(VERSION).tar.bz2 initscripts-$(VERSION).sha1sum fedorahosted.org:initscripts 2>/dev/null|| scp initscripts-$(VERSION).tar.bz2 initscripts-$(VERSION).sha1sum fedorahosted.org:/srv/web/releases/i/n/initscripts
@echo "Everything done, files uploaded to Fedorahosted.org"
-
diff --git a/initscripts.spec b/initscripts.spec
index 55ac44d3..5a9dc4b0 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -4,11 +4,11 @@
Summary: The inittab file and the /etc/init.d scripts
Name: initscripts
-Version: 9.21
+Version: 9.21.systemd
# ppp-watch is GPLv2+, everything else is GPLv2
License: GPLv2 and GPLv2+
Group: System Environment/Base
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: http://fedorahosted.org/releases/i/n/initscripts/
Source: http://fedorahosted.org/releases/i/n/initscripts/initscripts-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -66,6 +66,15 @@ your Red Hat or Fedora system, change runlevels, and shut the system down
cleanly. Initscripts also contains the scripts that activate and
deactivate most network interfaces.
+%package legacy
+Summary: Support for legacy booting methods
+Requires: initscripts = %{version}-%{release}
+Group: System Environment/Base
+
+%description legacy
+The initscripts-legacy package contains basic scripts that may be
+required to boot the system using older init systems
+
%package -n debugmode
Summary: Scripts for running in debugging mode
Requires: initscripts
@@ -217,6 +226,7 @@ rm -rf $RPM_BUILD_ROOT
/etc/init/*
%endif
%if %{_with_systemd}
+/lib/systemd/*
/lib/systemd/system/*
%endif
%config /etc/X11/prefdm
@@ -224,15 +234,15 @@ rm -rf $RPM_BUILD_ROOT
%dir /etc/rc.d
%dir /etc/rc.d/rc[0-9].d
%config(missingok) /etc/rc.d/rc[0-9].d/*
+%exclude /etc/rc.d/rc[0-9].d/*reboot
+%exclude /etc/rc.d/rc[0-9].d/*halt
/etc/rc[0-9].d
-/etc/rc
%dir /etc/rc.d/init.d
/etc/rc.local
-/etc/rc.sysinit
/etc/rc.d/init.d/*
-/etc/rc.d/rc
+%exclude /etc/rc.d/init.d/halt
+%exclude /etc/rc.d/init.d/reboot
%config(noreplace) /etc/rc.d/rc.local
-/etc/rc.d/rc.sysinit
%config(noreplace) /etc/sysctl.conf
%exclude /etc/profile.d/debug*
/etc/profile.d/*
@@ -249,6 +259,8 @@ rm -rf $RPM_BUILD_ROOT
/sbin/sushell
%attr(2755,root,root) /sbin/netreport
/lib/udev/rules.d/*
+%exclude /lib/udev/rules.d/10-console.rules
+%exclude /lib/udev/rules.d/88-clock.rules
/lib/udev/rename_device
/lib/udev/console_init
/lib/udev/console_check
@@ -274,6 +286,21 @@ rm -rf $RPM_BUILD_ROOT
%ghost %attr(0664,root,utmp) /var/log/wtmp
%ghost %attr(0664,root,utmp) /var/run/utmp
+%files legacy
+%defattr(-,root,root)
+%config(noreplace) /etc/inittab
+%dir /etc/rc.d
+%dir /etc/rc.d/rc[0-9].d
+%config(missingok) /etc/rc.d/rc[0-9].d/*
+/etc/rc[0-9].d
+/etc/rc
+%dir /etc/rc.d/init.d
+/etc/rc.sysinit
+/etc/rc.d/init.d/*
+/etc/rc.d/rc
+/etc/rc.d/rc.sysinit
+/lib/udev/rules.d/*
+
%files -n debugmode
%defattr(-,root,root)
%config(noreplace) /etc/sysconfig/debug
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index ff003e92..da519504 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -537,8 +537,9 @@ fi
# Configure machine if necessary.
if [ -f /.unconfigured ]; then
- if [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --ping ; then
- /usr/bin/rhgb-client --quit
+
+ if [ -x /usr/bin/plymouth ]; then
+ /usr/bin/plymouth quit
fi
if [ -x /usr/bin/system-config-keyboard ]; then
@@ -654,7 +655,7 @@ if strstr "$cmdline" confirm ; then
fi
# Let rhgb know that we're leaving rc.sysinit
-if [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --ping ; then
- /usr/bin/rhgb-client --sysinit
+if [ -x /usr/bin/plymouth ]; then
+ /usr/bin/plymouth --sysinit
fi
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
diff --git a/udev/rules.d/60-net.rules b/udev/rules.d/60-net.rules
index 5a2146d9..718ad5d9 100644
--- a/udev/rules.d/60-net.rules
+++ b/udev/rules.d/60-net.rules
@@ -1,3 +1,2 @@
-ACTION=="add", SUBSYSTEM=="net", DEVPATH=="/devices/virtual/net/lo", RUN+="/sbin/ifup $env{INTERFACE}"
ACTION=="add", SUBSYSTEM=="net", PROGRAM="/lib/udev/rename_device", RESULT=="?*", ENV{INTERFACE_NAME}="$result"
SUBSYSTEM=="net", RUN+="/etc/sysconfig/network-scripts/net.hotplug"