Blame SOURCES/coidracut4.patch

302623
diff --git a/systemd/coreos-installer-generator b/systemd/coreos-installer-generator
302623
index b2bcaec..2b85dc5 100755
302623
--- a/systemd/coreos-installer-generator
302623
+++ b/systemd/coreos-installer-generator
302623
@@ -2,6 +2,8 @@
302623
 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
302623
 # ex: ts=8 sw=4 sts=4 et filetype=sh
302623
 
302623
+command -v getarg >/dev/null || . /usr/lib/dracut-lib.sh
302623
+
302623
 set -e
302623
 
302623
 # Generators don't have logging right now
302623
@@ -10,6 +12,14 @@ exec 1>/dev/kmsg; exec 2>&1
302623
 
302623
 UNIT_DIR="${1:-/tmp}"
302623
 
302623
+add_requires() {
302623
+    local name="$1"; shift
302623
+    local target="$1"; shift
302623
+    local requires_dir="${UNIT_DIR}/${target}.requires"
302623
+    mkdir -p "${requires_dir}"
302623
+    ln -sf "../${name}" "${requires_dir}/${name}"
302623
+}
302623
+
302623
 cmdline=( $(
302623
 karg() {
302623
     local name="$1" value="$2"
302623
@@ -38,3 +48,38 @@ if [ -n "$(karg coreos.inst.install_dev)" ]; then
302623
         > /run/coreos-installer-reboot
302623
     fi
302623
 fi
302623
+
302623
+add_requires run-media-iso.mount default.target
302623
+
302623
+isoroot=$(getarg edge.liveiso= ||:)
302623
+
302623
+mkdir -p /run/media/iso
302623
+isosrc=dev/disk/by-label/${isoroot}
302623
+isosrc_escaped=$(systemd-escape -p --suffix=device "${isosrc}")
302623
+
302623
+if [ -n "${isoroot}" ]; then
302623
+cat >"${UNIT_DIR}/run-media-iso.mount" <
302623
+# Automatically generated by live-generator
302623
+[Unit]
302623
+DefaultDependencies=false
302623
+# HACK for https://github.com/coreos/fedora-coreos-config/issues/437
302623
+Wants=systemd-udev-settle.service
302623
+Wants=systemd-udevd.service
302623
+After=systemd-udevd.service
302623
+After=basic.target
302623
+# Network is enabled here
302623
+After=nm-run.service
302623
+# compat: remove when everyone is on dracut 053+
302623
+After=dracut-initqueue.service
302623
+
302623
+Before=coreos-installer.service
302623
+After=${isosrc_escaped}
302623
+Requires=${isosrc_escaped}
302623
+ConditionKernelCommandLine=coreos.inst.image_file
302623
+[Mount]
302623
+What=/${isosrc}
302623
+Where=/run/media/iso
302623
+Options=ro
302623
+Type=iso9660
302623
+EOF
302623
+fi
302623
\ No newline at end of file
302623
diff --git a/systemd/growfs.service b/systemd/growfs.service
302623
index 6d77aaa..fee934d 100644
302623
--- a/systemd/growfs.service
302623
+++ b/systemd/growfs.service
302623
@@ -5,7 +5,6 @@ DefaultDependencies=false
302623
 After=coreos-installer.service
302623
 Before=coreos-installer-reboot.service
302623
 Requires=dev-disk-by\x2dlabel-root.device
302623
-After=dev-disk-by\x2dlabel-root.device
302623
 
302623
 [Service]
302623
 Type=oneshot