]> git.pld-linux.org Git - packages/acpid.git/commitdiff
- skip loading modules if already loaded (useful on restarts)
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 23 Mar 2010 07:28:07 +0000 (07:28 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    acpid.init -> 1.32

acpid.init

index caea41f999cf9e49295efb859cb823619fe6eaff..2422a78dc385526d07a728cea04ea4e790f1edc3 100644 (file)
@@ -52,6 +52,11 @@ load_modules() {
                return
        fi
 
+       # see if the modules are already loaded
+       if [ "$(lsmod | grep -E '^('$(echo $MODULES | tr ' ' '|')')\b' | wc -l)" = "$(echo $MODULES | wc -w)" ]; then
+               return
+       fi
+
        show "Loading ACPI modules..."; busy
        modprobe --all $MODULES && ok || fail
 }
This page took 0.034984 seconds and 4 git commands to generate.