diff options
author | Tobias Powalowski <tpowa@archlinux.org> | 2007-04-22 13:37:53 +0000 |
---|---|---|
committer | Tobias Powalowski <tpowa@archlinux.org> | 2007-04-22 13:37:53 +0000 |
commit | 3fc84b485213763335a5b820f8a4b4d6483be20d (patch) | |
tree | 2658f7861253d31aeb9985b10708bf5d17c06b45 /rc.sysinit | |
parent | b04f18c15cef8f6d48aa0aa63fa8104b551fe1db (diff) | |
download | initscripts-3fc84b485213763335a5b820f8a4b4d6483be20d.tar.xz |
'upgpkg: added autoloading of standard acpi modules during boot, with the possibility to blacklist by default methods'
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-x | rc.sysinit | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -52,6 +52,24 @@ if ! [ "$load_modules" = "off" ]; then done stat_done fi + if [ -d /proc/acpi ]; then + stat_busy "Loading standard ACPI modules" + ACPI_MODULES="ac battery button fan processor thermal" + k="$(echo $BLACKLIST ${MOD_BLACKLIST[@]} | sed 's|-|_|g')" + j="$(echo ${MODULES[@]} | sed 's|-|_|g')" + #add disabled MODULES (!) to blacklist - much requested feature + for m in ${j}; do + [ "$m" != "${m#!}" ] && k="${k} ${m#!}" + done + # add disablemodules= from commandline to blacklist + k="${k} $(echo ${disablemodules} | sed 's|-|_|g' | sed 's|,| |g')" + for n in ${ACPI_MODULES}; do + if ! echo ${k} | /bin/grep "\<$n\>" 2>&1 >/dev/null; then + /sbin/modprobe $n > /dev/null 2>&1 + fi + done + stat_done + fi fi # run udev uevents |