[Pkg-acpi-devel] Bug#499825: An init script is syntax error

Jonny jonny at csc.jp
Tue Sep 23 13:02:51 UTC 2008


Hi,

Why does it see /etc/apt/sources.list? Since I moved to 
/etc/apt/sources.list.d, the file does not exist.

 # /etc/init.d/acpid restart
 grep: /etc/apt/sources.list: No such file or directory
 grep: /etc/apt/sources.list: No such file or directory
 Stopping ACPI services....
 grep: /etc/apt/sources.list: No such file or directory
 Loading ACPI modules....
 Starting ACPI services....


How about carrying out like this?

# for Debian
if [ -d "/lib/modules/$(uname -r)/kernel/drivers/acpi" ]; then
  LOC="/lib/modules/$(uname -r)/kernel/drivers/acpi"
# for Ubuntu
elif [ -d "/lib/modules/$(uname -r)/kernel/ubuntu/acpi" ]; then
  LOC="/lib/modules/$(uname -r)/kernel/ubuntu/acpi"
else
   MODAVAIL=""
fi

# Get list of available modules
if [ -n "$LOC" ]; then
  MODAVAIL="$( ( find $LOC -type f -name "*.o" -printf \
    "basename %f .o\n"; find $LOC -type f -name "*.ko" -printf \
    "basename %f .ko\n" ) | /bin/sh )"
fi





More information about the Pkg-acpi-devel mailing list