This commit is contained in:
parent
dd9a0ca807
commit
f52731c0cc
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 8 11:04:56 CEST 2007 - thoenig@suse.de
|
||||||
|
|
||||||
|
- remove loading of ACPI modules, they are now being loaded
|
||||||
|
automatically (#216564)
|
||||||
|
- rename ibm_acpi.modprobe to thinkpad_acpi.modprobe as the kernel
|
||||||
|
module was renamed (#297812)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jul 30 16:12:33 CEST 2007 - seife@suse.de
|
Mon Jul 30 16:12:33 CEST 2007 - seife@suse.de
|
||||||
|
|
||||||
|
16
acpid.spec
16
acpid.spec
@ -13,7 +13,7 @@
|
|||||||
Name: acpid
|
Name: acpid
|
||||||
URL: http://acpid.sourceforge.net/
|
URL: http://acpid.sourceforge.net/
|
||||||
Version: 1.0.6
|
Version: 1.0.6
|
||||||
Release: 9
|
Release: 12
|
||||||
%define acpi_version 0.09
|
%define acpi_version 0.09
|
||||||
License: GPL v2 or later
|
License: GPL v2 or later
|
||||||
Group: System/Daemons
|
Group: System/Daemons
|
||||||
@ -25,7 +25,7 @@ Patch: %{name}-%{version}.dif
|
|||||||
Source1: acpi-%{acpi_version}.tar.bz2
|
Source1: acpi-%{acpi_version}.tar.bz2
|
||||||
Source2: rcacpid
|
Source2: rcacpid
|
||||||
Source3: README.SuSE
|
Source3: README.SuSE
|
||||||
Source4: ibm_acpi.modprobe
|
Source4: thinkpad_acpi.modprobe
|
||||||
Source5: events.default
|
Source5: events.default
|
||||||
Patch1: acpi_%{acpi_version}.dif
|
Patch1: acpi_%{acpi_version}.dif
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
@ -66,7 +66,7 @@ popd
|
|||||||
%install
|
%install
|
||||||
make install INSTPREFIX=%{buildroot} SBINDIR=%{buildroot}/sbin
|
make install INSTPREFIX=%{buildroot} SBINDIR=%{buildroot}/sbin
|
||||||
install -Dm 744 rcacpid %{buildroot}/etc/init.d/acpid
|
install -Dm 744 rcacpid %{buildroot}/etc/init.d/acpid
|
||||||
install -Dm 644 ibm_acpi.modprobe %{buildroot}/etc/modprobe.d/ibm_acpi
|
install -Dm 644 thinkpad_acpi.modprobe %{buildroot}/etc/modprobe.d/thinkpad_acpi
|
||||||
mkdir -p %{buildroot}/usr/sbin
|
mkdir -p %{buildroot}/usr/sbin
|
||||||
ln -sf ../../etc/init.d/acpid %{buildroot}/usr/sbin/rcacpid
|
ln -sf ../../etc/init.d/acpid %{buildroot}/usr/sbin/rcacpid
|
||||||
install -Dm 644 events.default %{buildroot}/etc/acpi/events/default
|
install -Dm 644 events.default %{buildroot}/etc/acpi/events/default
|
||||||
@ -77,7 +77,6 @@ install -Dm 644 acpi.1 %{buildroot}/%{_mandir}/man1/acpi.1
|
|||||||
popd
|
popd
|
||||||
# for the rpmlint fascists
|
# for the rpmlint fascists
|
||||||
mv samples examples
|
mv samples examples
|
||||||
mkdir -p %{buildroot}/var/lib/acpi
|
|
||||||
# keep the logfile
|
# keep the logfile
|
||||||
install -dm 755 %buildroot%_var/log
|
install -dm 755 %buildroot%_var/log
|
||||||
touch %buildroot%_var/log/acpid
|
touch %buildroot%_var/log/acpid
|
||||||
@ -87,7 +86,6 @@ rm -rf %{buildroot}
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
%{fillup_and_insserv -Y -f acpid}
|
%{fillup_and_insserv -Y -f acpid}
|
||||||
rm -f -- var/lib/acpi/*
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%restart_on_update acpid
|
%restart_on_update acpid
|
||||||
@ -103,7 +101,7 @@ rm -f -- var/lib/acpi/*
|
|||||||
%dir /etc/acpi/events
|
%dir /etc/acpi/events
|
||||||
/etc/acpi/events/default
|
/etc/acpi/events/default
|
||||||
/etc/init.d/acpid
|
/etc/init.d/acpid
|
||||||
/etc/modprobe.d/ibm_acpi
|
/etc/modprobe.d/thinkpad_acpi
|
||||||
/usr/sbin/rcacpid
|
/usr/sbin/rcacpid
|
||||||
/sbin/acpid
|
/sbin/acpid
|
||||||
/usr/bin/acpi_listen
|
/usr/bin/acpi_listen
|
||||||
@ -113,9 +111,13 @@ rm -f -- var/lib/acpi/*
|
|||||||
/usr/bin/acpi
|
/usr/bin/acpi
|
||||||
/usr/share/man/man1/acpi.1.gz
|
/usr/share/man/man1/acpi.1.gz
|
||||||
%ghost %config(noreplace,missingok) %_var/log/acpid
|
%ghost %config(noreplace,missingok) %_var/log/acpid
|
||||||
%dir %attr(0750, root, root) /var/lib/acpi
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 08 2007 - thoenig@suse.de
|
||||||
|
- remove loading of ACPI modules, they are now being loaded
|
||||||
|
automatically (#216564)
|
||||||
|
- rename ibm_acpi.modprobe to thinkpad_acpi.modprobe as the kernel
|
||||||
|
module was renamed (#297812)
|
||||||
* Mon Jul 30 2007 - seife@suse.de
|
* Mon Jul 30 2007 - seife@suse.de
|
||||||
- fix "--skip-unsupported" warnings on module load (b.n.c #293758)
|
- fix "--skip-unsupported" warnings on module load (b.n.c #293758)
|
||||||
* Tue Jul 03 2007 - seife@suse.de
|
* Tue Jul 03 2007 - seife@suse.de
|
||||||
|
84
rcacpid
84
rcacpid
@ -64,20 +64,6 @@ rc_reset
|
|||||||
# with force-reload (in case signaling is not supported) are
|
# with force-reload (in case signaling is not supported) are
|
||||||
# considered a success.
|
# considered a success.
|
||||||
|
|
||||||
ACPI_MODULES=""
|
|
||||||
DEFAULT_ACPI_MODULES="ac battery button fan processor thermal"
|
|
||||||
ACPI_LAPTOP_MODULES_PROBE="asus_acpi ibm_acpi toshiba_acpi sony_acpi pcc_acpi dock bay"
|
|
||||||
ACPI_LAPTOP_MODULES_FILE="/var/lib/acpi/laptop_modules"
|
|
||||||
|
|
||||||
ARCH=`uname -i`
|
|
||||||
case $ARCH in
|
|
||||||
ia64) DEFAULT_ACPI_MODULES="button fan processor thermal"
|
|
||||||
ACPI_LAPTOP_MODULES_PROBE=""
|
|
||||||
# avoid even occassional probing of laptop modules!
|
|
||||||
ACPI_LAPTOP_MODULES_USER="NONE"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
[ -f /etc/sysconfig/powersave/common ] && . /etc/sysconfig/powersave/common
|
[ -f /etc/sysconfig/powersave/common ] && . /etc/sysconfig/powersave/common
|
||||||
[ -f /etc/sysconfig/acpi ] && . /etc/sysconfig/acpi
|
[ -f /etc/sysconfig/acpi ] && . /etc/sysconfig/acpi
|
||||||
[ -f /etc/sysconfig/powersave/cpufreq ] && . /etc/sysconfig/powersave/cpufreq
|
[ -f /etc/sysconfig/powersave/cpufreq ] && . /etc/sysconfig/powersave/cpufreq
|
||||||
@ -90,76 +76,6 @@ case "$1" in
|
|||||||
rc_exit
|
rc_exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "acpid: loading ACPI modules ( "
|
|
||||||
if [ "$ACPI_MODULES" != "NONE" ]; then
|
|
||||||
# load ACPI modules
|
|
||||||
for m in ${ACPI_MODULES:-$DEFAULT_ACPI_MODULES}; do
|
|
||||||
grep -wq $m /proc/modules || { modprobe -s $m && echo -n "$m " || rc_status; }
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
echo -n ") "
|
|
||||||
rc_status -v
|
|
||||||
|
|
||||||
if [ -n "$ACPI_LAPTOP_MODULES_USER" ]; then
|
|
||||||
if [ "$ACPI_LAPTOP_MODULES_USER" != "NONE" ]; then
|
|
||||||
echo -n "acpid: loading ACPI laptop modules ( "
|
|
||||||
# Load modules defined by user
|
|
||||||
for m in ${ACPI_LAPTOP_MODULES_USER}; do
|
|
||||||
grep -wq $m /proc/modules || { modprobe -s $m && echo -n "$m " || rc_status; }
|
|
||||||
done
|
|
||||||
echo -n ") "
|
|
||||||
rc_status -v
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [ /boot/vmlinuz -ot "$ACPI_LAPTOP_MODULES_FILE" ]; then
|
|
||||||
echo -n "acpid: loading ACPI laptop modules ( "
|
|
||||||
# Load modules defined by system probe
|
|
||||||
while read m; do
|
|
||||||
grep -wq $m /proc/modules || { modprobe -s $m && echo -n "$m " || rc_status; }
|
|
||||||
done < $ACPI_LAPTOP_MODULES_FILE
|
|
||||||
echo -n ") "
|
|
||||||
rc_status -v
|
|
||||||
else
|
|
||||||
# First run, or kernel has been updated. We have to probe which
|
|
||||||
# modules load successfully. For this, we do respect
|
|
||||||
# LOAD_UNSUPPORTED_MODULES_AUTOMATICALLY.
|
|
||||||
|
|
||||||
echo "acpid: probing laptop ACPI modules "
|
|
||||||
touch "$ACPI_LAPTOP_MODULES_FILE"
|
|
||||||
for m in $ACPI_LAPTOP_MODULES_PROBE; do
|
|
||||||
if modprobe $MODPROBE_OPTS -s $m; then
|
|
||||||
# pcc_acpi and sony_acpi can always be loaded.
|
|
||||||
# remove them if the system does not support them.
|
|
||||||
case $m in
|
|
||||||
sony_acpi)
|
|
||||||
if [ ! -r /proc/acpi/sony/brightness ] ; then
|
|
||||||
grep -wq $m /proc/modules && rmmod sony_acpi;
|
|
||||||
continue
|
|
||||||
fi ;;
|
|
||||||
pcc_acpi)
|
|
||||||
if [ ! -r /proc/acpi/panasonic -a ! -r /proc/acpi/pcc ] ; then
|
|
||||||
grep -wq $m /proc/modules && rmmod pcc_acpi;
|
|
||||||
continue
|
|
||||||
fi ;;
|
|
||||||
asus_acpi)
|
|
||||||
if [ ! -r /proc/acpi/asus ] ; then
|
|
||||||
grep -wq $m /proc/modules && rmmod asus_acpi;
|
|
||||||
continue
|
|
||||||
fi ;;
|
|
||||||
esac
|
|
||||||
echo $m >> $ACPI_LAPTOP_MODULES_FILE
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo -n "acpid: added "
|
|
||||||
while read m; do
|
|
||||||
echo -n "$m "
|
|
||||||
done < $ACPI_LAPTOP_MODULES_FILE
|
|
||||||
|
|
||||||
echo -n "to $ACPI_LAPTOP_MODULES_FILE"
|
|
||||||
rc_status -v;
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -n "Starting acpid "
|
echo -n "Starting acpid "
|
||||||
startproc $ACPID_BIN
|
startproc $ACPID_BIN
|
||||||
rc_status -v
|
rc_status -v
|
||||||
|
@ -9,4 +9,4 @@
|
|||||||
# http://bugzilla.novell.com/
|
# http://bugzilla.novell.com/
|
||||||
#
|
#
|
||||||
|
|
||||||
options ibm_acpi hotkey=enabled,0xffff experimental=1
|
options thinkpad_acpi hotkey=enabled,0xffff experimental=1
|
Loading…
Reference in New Issue
Block a user