You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qubes-installer-qubes-os/anaconda/dracut/fetch-driver-net.sh

25 lines
723 B

#!/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