diff options
author | Anssi Hannula <anssi@mageia.org> | 2011-12-02 21:32:31 +0000 |
---|---|---|
committer | Anssi Hannula <anssi@mageia.org> | 2011-12-02 21:32:31 +0000 |
commit | dbdf6b34e7bfa52f61835af2326fbb05ff88c8cf (patch) | |
tree | bb078cf7308ae2c9bd8e56dbcb56b125d3dc51e3 /tools/display_driver_helper | |
parent | 986723d0a8d0baffa98051475d66aa8586350c58 (diff) | |
download | drakx-kbd-mouse-x11-dbdf6b34e7bfa52f61835af2326fbb05ff88c8cf.tar drakx-kbd-mouse-x11-dbdf6b34e7bfa52f61835af2326fbb05ff88c8cf.tar.gz drakx-kbd-mouse-x11-dbdf6b34e7bfa52f61835af2326fbb05ff88c8cf.tar.bz2 drakx-kbd-mouse-x11-dbdf6b34e7bfa52f61835af2326fbb05ff88c8cf.tar.xz drakx-kbd-mouse-x11-dbdf6b34e7bfa52f61835af2326fbb05ff88c8cf.zip |
display_driver_helper: use modprobe --resolve-alias
Adapt display_driver_helper to use the new modprobe --resolve-alias
instead of manually parsing --dry-run --verbose output.
Diffstat (limited to 'tools/display_driver_helper')
-rw-r--r-- | tools/display_driver_helper | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/tools/display_driver_helper b/tools/display_driver_helper index 3285bfd..bcf9e91 100644 --- a/tools/display_driver_helper +++ b/tools/display_driver_helper @@ -249,15 +249,7 @@ load_driver() { local modulename local load_default=1 - # NOTE: UPDATE when module-init-tools is upgraded to get better performance - # modprobe has -R option: - #for modulename in $(/home/anssi/module-init-tools-3.12/build/modprobe -Rq "$1"); do - # modprobe does not have -R option: - for mod in $(/sbin/modprobe -biqvn "$1"); do - [ "$mod" = "insmod" ] && continue - modulename="${mod##*/}" - modulename="${modulename%%.*}" - + for modulename in $(/sbin/modprobe -Rq "$1"); do check_driver "$modulename" case $? in 1) # a driver which needs handling by this script matches @@ -327,9 +319,7 @@ get_active_kms_drivers() { device="$(dirname $device)" [ -f "$device/modalias" ] || continue modalias="$(cat "$device/modalias")" - for mod in $(/sbin/modprobe --first-time -biqvn "$modalias" 2>&1); do - modulename="${mod##*/}" - modulename="${modulename%%.*}" + for modulename in $(/sbin/modprobe -Rq "$modalias"); do IS_KMS= check_driver "$modulename" || continue [ -n "$IS_KMS" ] && echo $modulename |