Browse Source

dracut.sh: harden host_modalias reading

Some weird PPC driver make their modulias unreadable

$ cat /sys/devices/vio/4000/modalias
cat: /sys/devices/vio/4000/modalias: No such device
master
Harald Hoyer 12 years ago
parent
commit
57f90974f9
  1. 2
      dracut.sh

2
dracut.sh

@ -921,7 +921,7 @@ if [[ $hostonly ]]; then @@ -921,7 +921,7 @@ if [[ $hostonly ]]; then
declare -A host_modalias
find /sys/devices/ -name modalias -print > "$initdir/.modalias"
while read m; do
host_modalias["$(<"$m")"]=1
modalias="$(<"$m")" && [[ $modalias ]] && host_modalias["$modalias"]=1
done < "$initdir/.modalias"
rm -f -- "$initdir/.modalias"


Loading…
Cancel
Save