qubes-installer-qubes-os/anaconda/dracut/parse-anaconda-dd.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

31 lines
1.1 KiB
Bash

#!/bin/bash
# parse-anaconda-dd.sh: handle driver update disk settings
# Creates the following files:
# /tmp/dd_net: list of URLs to fetch
# /tmp/dd_disk: list of disk devices to load from
# /tmp/dd_interactive: "menu" if interactive mode requested
# /tmp/dd_todo: concatenation of the above files
# clear everything to ensure idempotency
rm -f /tmp/dd_interactive /tmp/dd_net /tmp/dd_disk /tmp/dd_todo
# parse any dd/inst.dd args found
for dd in $(getargs dd= inst.dd=); do
case "$dd" in
# plain 'dd'/'inst.dd': Engage interactive mode!
dd|inst.dd) echo menu > /tmp/dd_interactive ;;
# network URLs: add to dd_net
http:*|https:*|ftp:*|nfs:*|nfs4:*) echo $dd >> /tmp/dd_net ;;
# disks: strip "cdrom:" or "hd:" and add to dd_disk
cdrom:*|hd:*) echo ${dd#*:} >> /tmp/dd_disk ;;
# anything else is assumed to be a disk
*) echo $dd >> /tmp/dd_disk
esac
done
# for convenience's sake, mash 'em all into one list
for dd_f in /tmp/dd_interactive /tmp/dd_net /tmp/dd_disk; do
[ -f $dd_f ] && cat $dd_f >> /tmp/dd_todo
done