qubes-installer-qubes-os/anaconda/dracut/fetch-driver-net.sh
M. Vefa Bicakci 38f3e28d77
anaconda: Update to 23.19.10
Use the output of

  git diff --full-index --binary anaconda-22.20.13-1..anaconda-23.19.10-1

from anaconda's git repository and fix-up merge conflicts.
2016-04-10 00:00:00 -04:00

25 lines
723 B
Bash

#!/bin/bash
# fetch-driver-net - fetch driver from the network.
# runs from the "initqueue/online" hook whenever a net interface comes online
# initqueue/online hook passes interface name as $1
netif="$1"
# No dd_net was requested - exit
[ -f /tmp/dd_net ] || return 0
. /lib/url-lib.sh
while read dd; do
# If we already fetched this URL, skip it
grep -Fqx "$dd" /tmp/dd_net.done && continue
# Otherwise try to fetch it
info "Fetching driverdisk from $dd"
if driver=$(fetch_url "$dd"); then
echo "$dd" >> /tmp/dd_net.done # mark it done so we don't fetch it again
driver-updates --net "$dd" "$driver"
else
warn "Failed to fetch driver from $dd"
fi
done < /tmp/dd_net