From 18 Jan, 2021 0:00 UTC: All services will be temporary unavailable for maintenance
  • R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscaphegui翻訳comegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

bootable/newinstaller


Commit MetaInfo

Revision75a6d3533ca1d19ee3c99032dad2b7cbb79517fd (tree)
Time2020-05-07 00:36:49
AuthorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

0-auto-detect: fix parsing error if aliases contain brackets

Change Summary

Incremental Difference

--- a/initrd/scripts/0-auto-detect
+++ b/initrd/scripts/0-auto-detect
@@ -1,6 +1,5 @@
11 #
22 # By Chih-Wei Huang <cwhuang@linux.org.tw>
3-# Last updated 2017/01/17
43 #
54 # License: GNU Public License
65 # We explicitely grant the right to use the scripts
@@ -13,7 +12,7 @@ auto_detect()
1312 tmp=/tmp/dev2mod
1413 echo 'dev2mod() { while read dev; do case $dev in' > $tmp
1514 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
1716 echo 'esac; done; }' >> $tmp
1817 for f in $(grep -Eh "drm_kms|sound.core|hyperv" /lib/modules/`uname -r`/modules.dep | cut -d. -f1); do
1918 sed -i "/$(basename $f | sed 's/-/_/g')/d" $tmp