[master/rhel7 3/5] driverdisk: Process kickstart driverdisk commands (#1035663)

Brian C. Lane bcl at redhat.com
Fri Feb 7 02:26:55 UTC 2014


This launches the driver-updates UI if disk partitions have been written
to /tmp/dd_args_ks or it makes sure that the network is activated for
network kickstart driverdisk sources.

The UI needs to be rerun here because this will be executed after the
first run of the driver-updates UI.

Related: rhbz#1035663
---
 dracut/anaconda-lib.sh | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/dracut/anaconda-lib.sh b/dracut/anaconda-lib.sh
index d282297..348b5b4 100755
--- a/dracut/anaconda-lib.sh
+++ b/dracut/anaconda-lib.sh
@@ -206,6 +206,36 @@ run_kickstart() {
     esac
     [ "$root" = "anaconda-auto-cd" ] && do_disk=1
 
+    # kickstart Driver Disk Handling
+    # parse-kickstart may have added network inst.dd entries to the cmdline
+    # Or it may have written devices to /tmp/dd_ks
+
+    # Does network need to be rerun?
+    dd_args="$(getargs dd= inst.dd=)"
+    for dd in $dd_args; do
+        case "${dd%%:*}" in
+            http|https|ftp|nfs|nfs4)
+                do_net=1
+                rm /tmp/dd_net.done
+                break
+            ;;
+        esac
+    done
+
+    # Run the driver update UI for disks
+    if [ -e "/tmp/dd_ks" ]; then
+        # TODO: Seems like this should be a function, a mostly same version is used in 3 places
+        tty=$(find_tty)
+
+        # save module state
+        cat /proc/modules > /tmp/dd_modules
+
+        info "Starting Kickstart Driver Update Disk Service on $tty"
+        systemctl start driver-updates@$tty.service
+        status=$(systemctl -p ExecMainStatus show driver-updates@$tty.service)
+        info "DD status=$status"
+    fi
+
     # replay udev events to trigger actions
     if [ "$do_disk" ]; then
         . $hookdir/pre-trigger/*repo-genrules.sh
-- 
1.8.4.2



More information about the anaconda-patches mailing list