bootable/newinstaller
Révision | 75a6d3533ca1d19ee3c99032dad2b7cbb79517fd (tree) |
---|---|
l'heure | 2020-05-07 00:36:49 |
Auteur | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
0-auto-detect: fix parsing error if aliases contain brackets
@@ -1,6 +1,5 @@ | ||
1 | 1 | # |
2 | 2 | # By Chih-Wei Huang <cwhuang@linux.org.tw> |
3 | -# Last updated 2017/01/17 | |
4 | 3 | # |
5 | 4 | # License: GNU Public License |
6 | 5 | # We explicitely grant the right to use the scripts |
@@ -13,7 +12,7 @@ auto_detect() | ||
13 | 12 | tmp=/tmp/dev2mod |
14 | 13 | echo 'dev2mod() { while read dev; do case $dev in' > $tmp |
15 | 14 | sort -r /lib/modules/`uname -r`/modules.alias | \ |
16 | - sed -n 's/^alias *\([^ ]*\) *\(.*\)/\1)busybox modprobe \2;;/p' >> $tmp | |
15 | + sed -n 's/[()]/*/g; s/^alias *\([^ ]*\) *\(.*\)/\1)busybox modprobe \2;;/p' >> $tmp | |
17 | 16 | echo 'esac; done; }' >> $tmp |
18 | 17 | for f in $(grep -Eh "drm_kms|sound.core|hyperv" /lib/modules/`uname -r`/modules.dep | cut -d. -f1); do |
19 | 18 | sed -i "/$(basename $f | sed 's/-/_/g')/d" $tmp |