Blame SOURCES/coidracut.patch

302623
diff --git a/dracut/50rdcore/module-setup.sh b/dracut/50rdcore/module-setup.sh
302623
index 27a2ac3..443b5cf 100755
302623
--- a/dracut/50rdcore/module-setup.sh
302623
+++ b/dracut/50rdcore/module-setup.sh
302623
@@ -1,5 +1,47 @@
302623
 #!/bin/bash
302623
 
302623
+install_and_enable_unit() {
302623
+    unit="$1"; shift
302623
+    target="$1"; shift
302623
+    inst_simple "$moddir/$unit" "$systemdsystemunitdir/$unit"
302623
+    # note we `|| exit 1` here so we error out if e.g. the units are missing
302623
+    # see https://github.com/coreos/fedora-coreos-config/issues/799
302623
+    systemctl -q --root="$initdir" add-requires "$target" "$unit" || exit 1
302623
+}
302623
+
302623
 install() {
302623
     inst_simple "$moddir/rdcore" "/usr/bin/rdcore"
302623
+
302623
+    inst_simple "$moddir/coreos-installer" "/usr/bin/coreos-installer"
302623
+
302623
+    inst_simple "$moddir/coreos-installer-generator" \
302623
+        "$systemdutildir/system-generators/coreos-installer-generator"
302623
+
302623
+    inst_script "$moddir/coreos-installer-service" \
302623
+        "/usr/libexec/coreos-installer-service"
302623
+
302623
+    inst_script "$moddir/coreos-installer-disable-device-auto-activation" \
302623
+        "/usr/libexec/coreos-installer-disable-device-auto-activation"
302623
+
302623
+    install_and_enable_unit "coreos-installer.service" \
302623
+        "default.target" 
302623
+
302623
+    install_and_enable_unit "coreos-installer-reboot.service" \
302623
+        "default.target" 
302623
+
302623
+#    install_and_enable_unit "coreos-installer-noreboot.service" \
302623
+#        "basic.target" 
302623
+#    inst_simple "$moddir/coreos-installer-reboot.service" \
302623
+#        "$systemdsystemunitdir/coreos-installer-reboot.service"
302623
+#    inst_simple "$moddir/coreos-installer-noreboot.service" \
302623
+#        "$systemdsystemunitdir/coreos-installer-noreboot.service"
302623
+#
302623
+#    inst_simple "$moddir/coreos-installer.target" \
302623
+#        "$systemdsystemunitdir/coreos-installer.target"
302623
+#
302623
+#    inst_simple "$moddir/coreos-installer-pre.target" \
302623
+#        "$systemdsystemunitdir/coreos-installer-pre.target"
302623
+#
302623
+#    inst_simple "$moddir/coreos-installer-post.target" \
302623
+#        "$systemdsystemunitdir/coreos-installer-post.target"
302623
 }
302623
diff --git a/systemd/coreos-installer-generator b/systemd/coreos-installer-generator
302623
index 804d045..b2bcaec 100755
302623
--- a/systemd/coreos-installer-generator
302623
+++ b/systemd/coreos-installer-generator
302623
@@ -30,11 +30,11 @@ karg_bool() {
302623
 }
302623
 
302623
 if [ -n "$(karg coreos.inst.install_dev)" ]; then
302623
-    ln -sf "/usr/lib/systemd/system/coreos-installer-post.target" \
302623
-        "${UNIT_DIR}/default.target"
302623
+#    ln -sf "/usr/lib/systemd/system/coreos-installer-post.target" \
302623
+#        "${UNIT_DIR}/basic.target"
302623
 
302623
     # Create precondition for coreos-installer-reboot.service if requested
302623
     if ! karg_bool coreos.inst.skip_reboot; then
302623
-        touch /run/coreos-installer-reboot
302623
+        > /run/coreos-installer-reboot
302623
     fi
302623
 fi
302623
diff --git a/systemd/coreos-installer-reboot.service b/systemd/coreos-installer-reboot.service
302623
index 18fdb4b..ad79614 100644
302623
--- a/systemd/coreos-installer-reboot.service
302623
+++ b/systemd/coreos-installer-reboot.service
302623
@@ -1,7 +1,7 @@
302623
 [Unit]
302623
 Description=Reboot after CoreOS Installer
302623
-Requires=coreos-installer.target
302623
-After=coreos-installer.target
302623
+#Requires=coreos-installer.target
302623
+After=coreos-installer.service
302623
 OnFailure=emergency.target
302623
 OnFailureJobMode=replace-irreversibly
302623
 ConditionPathExists=/run/coreos-installer-reboot
302623
diff --git a/systemd/coreos-installer.service b/systemd/coreos-installer.service
302623
index 5e222f2..716b783 100644
302623
--- a/systemd/coreos-installer.service
302623
+++ b/systemd/coreos-installer.service
302623
@@ -1,12 +1,20 @@
302623
 [Unit]
302623
 Description=CoreOS Installer
302623
-Before=coreos-installer.target
302623
-After=network-online.target
302623
-Wants=network-online.target
302623
+#Before=coreos-installer.target
302623
+#After=nm-run.service
302623
+#After=network-online.target
302623
+#Wants=network-online.target
302623
 # Until we retry HTTP requests let's wait here until
302623
 # systemd-resolved comes up if enabled.
302623
 # https://github.com/coreos/coreos-installer/issues/283
302623
-After=systemd-resolved.service
302623
+#After=systemd-resolved.service
302623
+
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
 ConditionKernelCommandLine=coreos.inst.install_dev
302623
 OnFailure=emergency.target
302623
 OnFailureJobMode=replace-irreversibly