OSDN Git Service
(root)
/
android-x86
/
bootable-newinstaller.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6b5590f
)
0-auto-detect: fix parsing error if aliases contain brackets
author
Chih-Wei Huang
<cwhuang@linux.org.tw>
Wed, 6 May 2020 15:36:49 +0000
(23:36 +0800)
committer
Chih-Wei Huang
<cwhuang@linux.org.tw>
Wed, 6 May 2020 15:36:49 +0000
(23:36 +0800)
initrd/scripts/0-auto-detect
patch
|
blob
|
history
diff --git
a/initrd/scripts/0-auto-detect
b/initrd/scripts/0-auto-detect
index
432a73d
..
5c30a3e
100644
(file)
--- a/
initrd/scripts/0-auto-detect
+++ b/
initrd/scripts/0-auto-detect
@@
-1,6
+1,5
@@
#
# By Chih-Wei Huang <cwhuang@linux.org.tw>
#
# By Chih-Wei Huang <cwhuang@linux.org.tw>
-# Last updated 2017/01/17
#
# License: GNU Public License
# We explicitely grant the right to use the scripts
#
# License: GNU Public License
# We explicitely grant the right to use the scripts
@@
-13,7
+12,7
@@
auto_detect()
tmp=/tmp/dev2mod
echo 'dev2mod() { while read dev; do case $dev in' > $tmp
sort -r /lib/modules/`uname -r`/modules.alias | \
tmp=/tmp/dev2mod
echo 'dev2mod() { while read dev; do case $dev in' > $tmp
sort -r /lib/modules/`uname -r`/modules.alias | \
- sed -n 's/^alias *\([^ ]*\) *\(.*\)/\1)busybox modprobe \2;;/p' >> $tmp
+ sed -n 's/
[()]/*/g; s/
^alias *\([^ ]*\) *\(.*\)/\1)busybox modprobe \2;;/p' >> $tmp
echo 'esac; done; }' >> $tmp
for f in $(grep -Eh "drm_kms|sound.core|hyperv" /lib/modules/`uname -r`/modules.dep | cut -d. -f1); do
sed -i "/$(basename $f | sed 's/-/_/g')/d" $tmp
echo 'esac; done; }' >> $tmp
for f in $(grep -Eh "drm_kms|sound.core|hyperv" /lib/modules/`uname -r`/modules.dep | cut -d. -f1); do
sed -i "/$(basename $f | sed 's/-/_/g')/d" $tmp