rpms/pm-utils/devel pm-utils-99hd-apm-restore, NONE, 1.1 pm-utils.spec, 1.84, 1.85
Till Maas (till)
fedora-extras-commits at redhat.com
Wed Jan 2 13:26:00 UTC 2008
Author: till
Update of /cvs/pkgs/rpms/pm-utils/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28587
Modified Files:
pm-utils.spec
Added Files:
pm-utils-99hd-apm-restore
Log Message:
* Wed Jan 02 2008 Till Maas <opensource till name> - 0.99.4-9
- restore hd apm level (RH #382061)
--- NEW FILE pm-utils-99hd-apm-restore ---
#!/bin/bash
# vim:noexpandtab
PATH=/sbin:/bin:/usr/sbin:/usr/bin
HD_APM_STATEFILE=/var/run/pm-hd-apm
HD_APM_DEVICES=sda
source /usr/lib/pm-utils/functions
case "$1" in
hibernate|suspend)
rm -f ${HD_APM_STATEFILE}
for DEVICE in ${HD_APM_DEVICES}
do
HD_APM_FEATURE=$(hdparm -I /dev/sda | grep "Advanced Power Management feature set")
if [[ "${HD_APM_FEATURE}" != "" ]]
then
if (echo "${HD_APM_FEATURE}" | grep "*")
then
HD_APM_LEVEL=$(/sbin/hdparm -I /dev/${DEVICE} | /bin/grep "Advanced power management level" | /bin/cut -d" " -f 5)
else
HD_APM_LEVEL=255
fi
echo "HD_APM_LEVEL_${DEVICE}=${HD_APM_LEVEL}" >> ${HD_APM_STATEFILE}
fi
done
;;
thaw|resume)
source ${HD_APM_STATEFILE}
for DEVICE in ${HD_APM_DEVICES}
do
eval HD_APM_LEVEL=\${HD_APM_LEVEL_${DEVICE}}
if [[ "${HD_APM_LEVEL}" != "" ]]
then
/sbin/hdparm -B ${HD_APM_LEVEL} /dev/${DEVICE}
fi
done
rm -f ${HD_APM_STATEFILE}
;;
*)
;;
esac
exit $?
Index: pm-utils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/pm-utils/devel/pm-utils.spec,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- pm-utils.spec 30 Dec 2007 21:24:45 -0000 1.84
+++ pm-utils.spec 2 Jan 2008 13:25:23 -0000 1.85
@@ -2,7 +2,7 @@
Summary: Power management utilities and scripts for Fedora
License: GPLv2
Version: 0.99.4
-Release: 7%{?dist}
+Release: 9%{?dist}
Group: System Environment/Base
URL: http://pm-utils.freedesktop.org
ExclusiveArch: i386 x86_64 ia64 ppc ppc64 %{?arm} sparc sparcv9 sparc64
@@ -13,6 +13,7 @@
%endif
Conflicts: bluez-utils < 2.25-6
Source0: pm-utils-%{version}.tar.gz
+Source1: pm-utils-99hd-apm-restore
Source1: pm-suspend.pam
Source2: pm-hibernate.pam
@@ -81,7 +82,7 @@
popd
install -D -m 0600 /dev/null $RPM_BUILD_ROOT%{_localstatedir}/log/pm-suspend.log
-
+install -D -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_exec_prefix}/lib/pm-utils/sleep.d/99hd-apm-restore
%clean
%{__rm} -rf $RPM_BUILD_ROOT
@@ -106,6 +107,7 @@
%files
%defattr(-,root,root,-)
+%doc README COPYING AUTHORS ChangeLog
%{_sysconfdir}/pm/
%{_sysconfdir}/security/console.apps/*
%{_sysconfdir}/pam.d/*
@@ -125,6 +127,12 @@
%ghost %verify(not md5 size mtime) %{_localstatedir}/log/pm-suspend.log
%changelog
+* Wed Jan 02 2008 Till Maas <opensource till name> - 0.99.4-9
+- restore hd apm level (RH #382061)
+
+* Mon Dec 31 2007 Till Maas <opensource till name> - 0.99.4-8
+- Add documentation to %%doc
+
* Sun Dec 30 2007 Till Maas <opensource till name> - 0.99.4-7
- fix some bugs (RH #302401)
More information about the fedora-extras-commits
mailing list