[arch-commits] CVS update of extra/daemons/powersave (8 files)

Jan de Groot jgc at archlinux.org
Sat Aug 25 10:10:11 UTC 2007


    Date: Saturday, August 25, 2007 @ 06:10:11
  Author: jgc
    Path: /home/cvs-extra/extra/daemons/powersave

 Removed: PKGBUILD (1.4) powersave.conf (1.1) powersave.install (1.1)
          powersaved (1.2) prepare_suspend_to_disk-arch.patch (1.1)
          rcpowersaved.arch (1.2) sleep (1.1)
          sleep_helper_functions-arch.patch (1.1)

Delete obsolete package


------------------------------------+
 PKGBUILD                           |   39 ------
 powersave.conf                     |   69 -----------
 powersave.install                  |   13 --
 powersaved                         |   42 -------
 prepare_suspend_to_disk-arch.patch |   29 ----
 rcpowersaved.arch                  |  102 -----------------
 sleep                              |  207 -----------------------------------
 sleep_helper_functions-arch.patch  |  168 ----------------------------
 8 files changed, 669 deletions(-)


Index: extra/daemons/powersave/PKGBUILD
diff -u extra/daemons/powersave/PKGBUILD:1.4 extra/daemons/powersave/PKGBUILD:removed
--- extra/daemons/powersave/PKGBUILD:1.4	Wed May 30 16:26:35 2007
+++ extra/daemons/powersave/PKGBUILD	Sat Aug 25 06:10:10 2007
@@ -1,39 +0,0 @@
-# $Id: PKGBUILD,v 1.4 2007/05/30 20:26:35 jgc Exp $
-# Maintainer: Jan de Groot <jgc at archlinux.org>
-# Contributer: Arjan Timmerman <arjan at soulfly.nl>
-# Note: this package will be removed in favour of pm-utils soon
-
-pkgname=powersave
-pkgver=0.14.0
-pkgrel=5
-pkgdesc="The powersave package provides global power management tasks. It supports battery monitoring, userspace workarounds for proper suspend/standby functionality and more."
-url="http://powersave.sf.net"
-arch=('i686')
-license="GPL"
-depends=('dbus-glib' 'hal' 'hdparm' 'acpid' 'cpufrequtils' 'vbetool' 'filesystem>=0.8-8')
-options=('!libtool')
-backup=(etc/powersave/battery etc/powersavedisk etc/powersave/scheme_advanced_powersave etc/powersave/scheme_presentation etc/powersave/common etc/powersave/events etc/powersave/scheme_performance etc/powersave/sleep etc/powersave/cpufreq etc/powersave/scheme_acoustic etc/powersave/scheme_powersave etc/powersave/thermal)
-source=(http://dl.sf.net/powersave/$pkgname-$pkgver.tar.bz2 powersave.conf \
-	sleep powersaved prepare_suspend_to_disk-arch.patch sleep_helper_functions-arch.patch rcpowersaved.arch)
-md5sums=('d45c639b5daa4f64540ec25fb54cbf95' '173a6a21cd3885b56bb9d03c2f7dc99f'\
-         '878a3e38646839350cedb5b3bf4a67de' '199b43133e60977fdfd423b3ac198946'\
-         'acb723975d2cd7df60c56f2be7dd6980' '0a72b220f932d8a4ef8eb94a6794dea0'\
-         '2300ade3a80611f7757f4a1ae9eb63a5')
-
-build() {
-  cd $startdir/src/$pkgname-$pkgver
-  patch -Np1 -i ${startdir}/src/sleep_helper_functions-arch.patch || return 1
-  patch -Np1 -i ${startdir}/src/prepare_suspend_to_disk-arch.patch || return 1
-  ./configure --prefix=/usr --sysconfdir=/etc --with-gnome-bindir=/usr/bin --with-kde-bindir=/opt/kde/bin --libexecdir=/usr/lib --disable-static
-  make || return 1
-  make DESTDIR=$startdir/pkg install
-  install -m644 $startdir/src/powersave.conf $startdir/pkg/etc/dbus-1/system.d/
-  install -Dm755 $startdir/src/powersaved $startdir/pkg/etc/rc.d/powersaved
-  install -m644 $startdir/src/sleep $startdir/pkg/etc/powersave
-  install -m755 contrib/vbestate* $startdir/pkg/usr/lib/powersave/scripts/
-
-  install -m755 $startdir/src/rcpowersaved.arch $startdir/pkg/usr/bin
-
-  rm -r $startdir/pkg/etc/init.d
-  rm -r $startdir/pkg/usr/sbin/rcpowersaved
-}
Index: extra/daemons/powersave/powersave.conf
diff -u extra/daemons/powersave/powersave.conf:1.1 extra/daemons/powersave/powersave.conf:removed
--- extra/daemons/powersave/powersave.conf:1.1	Sun Oct  1 08:54:38 2006
+++ extra/daemons/powersave/powersave.conf	Sat Aug 25 06:10:10 2007
@@ -1,69 +0,0 @@
-<!DOCTYPE busconfig PUBLIC
- "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
-<busconfig>
-
-  <!-- This configuration file specifies the required security policies
-       for the powersave daemone to work. -->
-
-  <policy context="default">
-     <deny own="com.novell.powersave"/>
-     <deny own="com.novell.powersave.manager"/>
-     <deny own="com.novell.powersave.request"/>
-     <deny own="com.novell.powersave.action"/>
-     <deny own="com.novell.powersave.scripts"/>
-     <deny own="com.novell.powersave.admin"/>
-
-     <deny send_interface="com.novell.powersave"/>
-     <deny send_interface="com.novell.powersave.manager"/>
-     <deny send_interface="com.novell.powersave.request"/>
-     <deny send_interface="com.novell.powersave.action"/>
-     <deny send_interface="com.novell.powersave.scripts"/>
-     <deny send_interface="com.novell.powersave.admin"/>
-
-     <deny receive_interface="com.novell.powersave"/>
-     <deny receive_interface="com.novell.powersave.manager"/>
-     <deny receive_interface="com.novell.powersave.request"/>
-     <deny receive_interface="com.novell.powersave.action"/>
-     <deny receive_interface="com.novell.powersave.scripts"/>
-     <deny receive_interface="com.novell.powersave.admin"/>
-  </policy>
-
-  <!-- Only root is allowed to own the powersave service -->
-  <policy user="root">
-    <allow own="com.novell.powersave"/>
-    <allow own="com.novell.powersave.manager"/>
-    <allow own="com.novell.powersave.request"/>
-    <allow own="com.novell.powersave.action"/>
-    <allow own="com.novell.powersave.scripts"/>
-    <allow own="com.novell.powersave.admin"/>
-
-    <allow send_interface="com.novell.powersave"/>
-    <allow send_interface="com.novell.powersave.manager"/>
-    <allow send_interface="com.novell.powersave.request"/>
-    <allow send_interface="com.novell.powersave.action"/>
-    <allow send_interface="com.novell.powersave.scripts"/>
-    <allow send_interface="com.novell.powersave.admin"/>
-
-    <allow receive_interface="com.novell.powersave"/>
-    <allow receive_interface="com.novell.powersave.manager"/>
-    <allow receive_interface="com.novell.powersave.request"/>
-    <allow receive_interface="com.novell.powersave.action"/>
-    <allow receive_interface="com.novell.powersave.scripts"/>
-    <allow receive_interface="com.novell.powersave.admin"/>
-  </policy>
-
-  <!--    Allow desktop users to connect -->
-  <policy group="power">
-    <allow send_interface="com.novell.powersave"/>
-    <allow send_interface="com.novell.powersave.manager"/>
-    <allow send_interface="com.novell.powersave.request"/>
-    <allow send_interface="com.novell.powersave.action"/>
-
-    <allow receive_interface="com.novell.powersave"/>
-    <allow receive_interface="com.novell.powersave.manager"/>
-    <allow receive_interface="com.novell.powersave.request"/>
-    <allow receive_interface="com.novell.powersave.action"/>
-  </policy>
-
-</busconfig>
Index: extra/daemons/powersave/powersave.install
diff -u extra/daemons/powersave/powersave.install:1.1 extra/daemons/powersave/powersave.install:removed
--- extra/daemons/powersave/powersave.install:1.1	Sun Feb  4 12:02:43 2007
+++ extra/daemons/powersave/powersave.install	Sat Aug 25 06:10:10 2007
@@ -1,13 +0,0 @@
-
-post_install() {
-  groupadd -g 98 power
-}
-
-post_remove() {
-  groupdel power
-}
-
-op=$1
-shift
-
-$op $*
Index: extra/daemons/powersave/powersaved
diff -u extra/daemons/powersave/powersaved:1.2 extra/daemons/powersave/powersaved:removed
--- extra/daemons/powersave/powersaved:1.2	Thu Oct  5 14:31:58 2006
+++ extra/daemons/powersave/powersaved	Sat Aug 25 06:10:10 2007
@@ -1,42 +0,0 @@
-#!/bin/bash
-
-# general config
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-case "$1" in
-    start)
-        #Check for running dbus, start when not running
-    	ck_daemon hal && /etc/rc.d/hal start
-	ck_daemon acpid && /etc/rc.d/acpid start
-	/usr/bin/rcpowersaved.arch
-        
-	stat_busy "Starting Powersave Daemon"
-	/usr/sbin/powersaved -d -f /var/run/acpid.socket
-	if [ $? -gt 0 ]; then
-		stat_fail
-	else
-		add_daemon powersaved
-		stat_done
-	fi
-        ;;
-    stop)
-	stat_busy "Stopping Powersaving Daemon"
-	[ -f /var/run/powersaved.pid ] && kill `cat /var/run/powersaved.pid` &> /dev/null
-	if [ $? -gt 0 ]; then
-		stat_fail
-	else
-		rm_daemon powersaved
-		stat_done
-	fi
-	;;
-    restart)
-        $0 stop
-	sleep 1
-        $0 start
-        ;;
-    *)
-        echo "usage: $0 {start|stop|restart}"
-	;;
-esac
-exit 0
Index: extra/daemons/powersave/prepare_suspend_to_disk-arch.patch
diff -u extra/daemons/powersave/prepare_suspend_to_disk-arch.patch:1.1 extra/daemons/powersave/prepare_suspend_to_disk-arch.patch:removed
--- extra/daemons/powersave/prepare_suspend_to_disk-arch.patch:1.1	Sun Oct  1 08:54:38 2006
+++ extra/daemons/powersave/prepare_suspend_to_disk-arch.patch	Sat Aug 25 06:10:10 2007
@@ -1,29 +0,0 @@
---- powersave-0.14.0/scripts/prepare_suspend_to_disk	2006-09-04 12:13:55.000000000 +0200
-+++ powersave-arch/scripts/prepare_suspend_to_disk	2006-10-01 13:56:37.000000000 +0200
-@@ -75,7 +75,25 @@
-             ppc*)   BOOTING="${BOOTING#*vmlinux-}" ;;
-             *)      BOOTING="${BOOTING#*vmlinuz-}" ;;
-         esac
--        if [ "$RUNNING" == "$BOOTING" ]; then
-+	# hacks for archlinux our kernels do not have the version in the filename, 
-+	#but we do not support multiple kernel version in the repo's anyway
-+	if [ /etc/arch-release ]; then 
-+	    echo "Arch linux found" >> $LSMOD_LOG
-+	    if [ `echo $RUNNING | grep ARCH` ]; then
-+	    	echo "Found ARCH kernel" >> $LSMOD_LOG
-+		RUNNING="vmlinuz26"	    
-+	    fi
-+	    if [ `echo $RUNNING | grep beyond` ]; then
-+	    	echo "Found beyond kernel" >> $LSMOD_LOG
-+		RUNNING="vmlinuz26beyond"	    
-+	    fi
-+	    if [ `echo $RUNNING | grep archck` ]; then
-+	    	echo "Found archck kernel" >> $LSMOD_LOG
-+		RUNNING="vmlinuz26archck"	    
-+	    fi
-+	    
-+	fi
-+	if [ "$RUNNING" == "$BOOTING" ]; then
-             NEXT_BOOT=${MENU_ENTRIES[$I]}
-             DEBUG "running kernel corresponds to grub menu entry $NEXT_BOOT" DIAG
-             DEBUG "kernel filename: '${KERNELS[$I]}'" DIAG
Index: extra/daemons/powersave/rcpowersaved.arch
diff -u extra/daemons/powersave/rcpowersaved.arch:1.2 extra/daemons/powersave/rcpowersaved.arch:removed
--- extra/daemons/powersave/rcpowersaved.arch:1.2	Thu Oct  5 14:31:58 2006
+++ extra/daemons/powersave/rcpowersaved.arch	Sat Aug 25 06:10:10 2007
@@ -1,102 +0,0 @@
-#!/bin/bash
-
-DEFAULT_ACPI_MODULES="ac battery button fan processor thermal"
-CONFIG=/etc/powersave
-
-test -r $CONFIG || exit 6
-. $CONFIG/common
-. $CONFIG/cpufreq
-. $CONFIG/thermal
-if test -e /etc/sysconfig/security; then
- . /etc/sysconfig/security
-fi
- 
-#LOGGER="/bin/logger -t rcpowersaved"
-LOGGER=echo 
-
-OPTS=""
-SYSFS_PATH="/sys/devices/system/cpu/cpu0/cpufreq"
-
-##################
-# Load governors #
-##################
-function load_governors() {
-     if [ ! -r $SYSFS_PATH ];then
-        $LOGGER Cannot load cpufreq governors - No cpufreq driver available
-        return 1
-    fi
-    
-    read govs < $SYSFS_PATH/scaling_available_governors
-    case "$govs" in
-        *powersave*) 
-            ;;
-        *) 
-            modprobe -q cpufreq_powersave >/dev/null 2>&1
-            [ $? != 0 ] && $LOGGER powersave cpufreq governor could not be loaded
-            ;;
-    esac
-    case "$govs" in
-        *performance*) 
-            ;;
-        *) 
-            modprobe -q cpufreq_performance >/dev/null 2>&1
-            [ $? != 0 ] && $LOGGER perfromance cpufreq governor could not be loaded
-            ;;
-    esac
-    case "$govs" in
-        *userspace*) 
-            ;;
-        *) 
-            modprobe -q cpufreq_userspace >/dev/null 2>&1
-            [ $? != 0 ] && $LOGGER userspace cpufreq governor could not be loaded
-            ;;
-    esac
-    case "$govs" in
-        *ondemand*)
-            ;;
-        *) 
-            modprobe -q cpufreq_ondemand >/dev/null 2>&1
-            [ $? != 0 ] && $LOGGER ondemand cpufreq governor could not be loaded
-            ;;
-    esac
-    return 0
-}
-
-
-########################
-# Load cpufreq modules #
-########################
-
-CPUFREQ_MODULES="p4-clockmod speedstep_centrino powernow_k8 powernow_k7 powernow_k6 longrun acpi speedstep_ich"
-	CPUFREQ_MODULES_GREP="^p4_clockmod\|^speedstep_centrino\|^speedstep_ich\|^powernow_k8\|^powernow_k7\|^powernow_k6\|^longrun\|^longhaul\|^acpi"
-	
-if [ "$CPUFREQ_ENABLED" != "no" ] && [ ! -d $SYSFS_PATH ]; then
-	# test for already loaded modules
-	ALREADY_LOADED_MODS=`grep $CPUFREQ_MODULES_GREP /proc/modules`
-	if [ "$CPUFREQD_MODULE" ]; then
-		modprobe -q $CPUFREQD_MODULE $CPUFREQD_MODULE_OPTS &>/dev/null
-		RETVAL=$?
-	# try to load one of the modules we know
-	elif [ -z "$ALREADY_LOADED_MODS" ] ; then 
-		for MODULE in $CPUFREQ_MODULES; do
-			modprobe $MODULE &>/dev/null
-			RETVAL=$?
-			[ "$RETVAL" = 0 ] && break
-		done
-		# skip if no module could be loaded!
-		if [ "$RETVAL" != 0 ]; then
-			$LOGGER "CPU frequency scaling is not supported by your processor."
-			$LOGGER "enter 'CPUFREQ_ENABLED=no' in $CONFIG/cpufreq to avoid this warning."
-			# remove eventually loaded modules, bug 150381
-			rmmod speedstep_lib freq_table 2>/dev/null
-		else
-			$LOGGER "enter '$MODULE' into CPUFREQD_MODULE in $CONFIG/cpufreq."
-			$LOGGER "this will speed up starting powersaved and avoid unnecessary warnings in syslog."
-		fi
-	fi
-fi
-
-[ "$CPUFREQ_ENABLED" != "no" ] && load_governors
-
-
-
Index: extra/daemons/powersave/sleep
diff -u extra/daemons/powersave/sleep:1.1 extra/daemons/powersave/sleep:removed
--- extra/daemons/powersave/sleep:1.1	Sun Oct  1 08:54:39 2006
+++ extra/daemons/powersave/sleep	Sat Aug 25 06:10:11 2007
@@ -1,207 +0,0 @@
-## Path:        	System/Powermanagement/Powersave/Sleep_Modes
-## Description: Configuration of all three sleep modes (S2 is not supported):\n \
-## S1 sleep (only ACPI) low wake-up latency, \n \
-## S3 (ACPI) suspend to ram or (on APM systems) standby and \n \
-## S4 (ACPI) suspend to disk or (on APM systems) suspend. \n \
-## \n \
-## For some hardware, modules have to be unloaded before entering the \
-## sleep state. You can configure these in this section. These modules \
-## will be unloaded in the specified order. Modules which depend on one \
-## of the specified modules, will also be unloaded. If not all modules \
-## can be unloaded, entering the sleep state will fail. \n \
-## After resuming, the modules that have been unloaded will be reloaded \
-## in reverse order. \n \
-## The same applies for the "SERVICES_TO_RESTART"-variables which define \
-## services which have to be stopped before entering a sleep state.
-
-## Path:        	System/Powermanagement/Powersave/Sleep_Modes
-### Type:        	string
-## Default:     	"nvsound acx100 acx_pci hsfmodem prism54 bcm4400 emu10k1 forcedeth ipw2100 ipw2200 natsemi psmouse rt2400 ehci_hcd ohci_hcd uhci_hcd ehci-hcd usb-ohci usb-uhci snd_ens1370 snd_ens1371 en1370 en1371 via_agp via_rhine i8042 intel_mch_agp rt2500 button speedstep_smi ndiswrapper"
-## ServiceRestart: 	"network,alsa,netfs"
-#
-# These modules will be unloaded before entering suspend to disk
-# See README.unload-modules for more information.
-# "NONE" means don't unload any modules.
-UNLOAD_MODULES_BEFORE_SUSPEND2DISK="prism54"
-
-## Path:        	System/Powermanagement/Powersave/Sleep_Modes
-### Type:        	string
-## Default:     	"nvsound acx100 acx_pci hsfmodem prism54 bcm4400 emu10k1 forcedeth ipw2100 ipw2200 natsemi psmouse rt2400 ehci_hcd ohci_hcd uhci_hcd ehci-hcd usb-ohci usb-uhci snd_ens1370 snd_ens1371 en1370 en1371 via_agp via_rhine i8042 intel_mch_agp rt2500 button speedstep_smi ndiswrapper"
-## ServiceRestart: 	"network,alsa,netfs"
-#
-# These modules will be unloaded before entering the corresponding
-# sleep state. See README.unload-modules for more information.
-# "NONE" means don't unload any modules.
-UNLOAD_MODULES_BEFORE_SUSPEND2RAM="prism54 "
-
-## Path:        	System/Powermanagement/Powersave/Sleep_Modes
-### Type:        	string
-## Default:     	"nvsound acx100 acx_pci hsfmodem prism54 bcm4400 emu10k1 forcedeth ipw2100 ipw2200 natsemi psmouse rt2400 ehci_hcd ohci_hcd uhci_hcd ehci-hcd usb-ohci usb-uhci snd_ens1370 snd_ens1371 en1370 en1371 via_agp via_rhine i8042 intel_mch_agp rt2500 button speedstep_smi ndiswrapper"
-## ServiceRestart: 	"network,alsa,netfs"
-#
-# These modules will be unloaded before entering the corresponding
-# sleep state. See README.unload-modules for more information.
-# "NONE" means don't unload any modules.
-UNLOAD_MODULES_BEFORE_STANDBY="prism54"
-
-## Path:        	System/Powermanagement/Powersave/Sleep_Modes
-## Type:        	string
-## Default:     	"slmodemd irda"
-#
-# All services that have to be stopped before entering a sleep mode
-# and restarted after the machine resumes.
-# If you notice problems of some services that may be related to 
-# suspend/standby, restarting the service may solve the problem.
-# The names to enter here are simply the filenames of the init scripts
-# in /etc/init.d. The services are stopped in the order entered here.
-# They are restarted after resume in the reverse order.
-# Entering "NONE" disables restarting of services ("" means default).
-SUSPEND2DISK_RESTART_SERVICES=""
-SUSPEND2RAM_RESTART_SERVICES=""
-STANDBY_RESTART_SERVICES=""
-
-## Path:        	System/Powermanagement/Powersave/Sleep_Modes
-## Type:        	yesno
-## Default:     	"yes"
-#
-# Should FAT and NTFS filesystems be unmounted before entering
-# a sleep mode and remounted after the machine resumed?
-# You should do this for suspend to disk if you want to boot
-# Windows while Linux is suspended to avoid severe data corruption
-# on the Windows filesystems.
-# Note that suspend will fail if the partitions cannot be unmounted.
-# This may cause problems with external storage media connected during
-# suspend.
-# Defaults to yes for suspend to disk, no for suspend to RAM / standby.
-SUSPEND2DISK_UNMOUNT_FATFS="yes"
-SUSPEND2RAM_UNMOUNT_FATFS="yes"
-STANDBY_UNMOUNT_FATFS="yes"
-
-## Path:        	System/Powermanagement/Powersave/Sleep_Modes
-## Type:        	yesno
-## Default:     	"no"
-#
-# Should PCMCIA cards (CardBus and PC-Card) be ejected before entering
-# a sleep mode and reinserted after the machine resumed?
-# This should not be necessary for most CardBus cards, PC-Cards seem to
-# need this more often.
-SUSPEND2DISK_EJECT_PCMCIA="yes"
-SUSPEND2RAM_EJECT_PCMCIA="yes"
-STANDBY_EJECT_PCMCIA="yes"
-
-## Path:		System/Powermanagement/Powersave/Sleep_Modes
-## Type:		yesno
-## Default:		"no"
-## ServiceRestart: 	powersaved
-#
-# Set this variable to yes to disable suspend to disk.
-DISABLE_USER_SUSPEND2DISK="no"
-
-## Path:		System/Powermanagement/Powersave/Sleep_Modes
-## Type:		yesno
-## Default:		"yes"
-## ServiceRestart: 	powersaved
-#
-# Set this variable to no to enable suspend to RAM.
-# Be careful, many machines do not support this, see the README.
-DISABLE_USER_SUSPEND2RAM="no"
-
-## Path:		System/Powermanagement/Powersave/Sleep_Modes
-## Type:		yesno
-## Default:		"yes"
-## ServiceRestart: 	powersaved
-#
-# Set this variable to no to enable standby (also needs BIOS support!)
-DISABLE_USER_STANDBY="no"
-
-## Path:        	System/Powermanagement/Powersave/Sleep_Modes
-## Type:        	integer(0:1000)
-## Default:     	0
-#
-# Specify the time in seconds a sleep state should be delayed. This can
-# be used to delay a power-button-induced suspend for some seconds to
-# be able to power off the machine hard.
-# 
-SUSPEND2DISK_DELAY=""
-SUSPEND2RAM_DELAY=""
-STANDBY_DELAY=""
-
-## Path:        	System/Powermanagement/Powersave/Sleep_Modes
-## Type:        	string(platform,firmware,shutdown,reboot)
-## Default:     	"platform"
-#
-# Specify the shutdown method the kernel uses after suspend-to-disk.
-# "shutdown" is known to work on most machines, "platform" may work,
-# too. "firmware" will most likely not work, "reboot" is for
-# debugging only. Use only if you know what this is for.
-#
-SUSPEND2DISK_SHUTDOWN_MODE="shutdown"
-
-## Path:        	System/Powermanagement/Powersave/Sleep_Modes
-## Type:        	yesno
-## Default:     	"no"
-#
-# Should the system clock be reset from the hardware clock after
-# suspend-to-disk or suspend-to-RAM? This may be unneccessary depending
-# on kernel version and SUSPEND2DISK_SHUTDOWN_MODE, but will not hurt.
-SUSPEND2DISK_RESTORE_CLOCK=""
-SUSPEND2RAM_RESTORE_CLOCK=""
-STANDBY_RESTORE_CLOCK=""
-
-## Path:        	System/Powermanagement/Powersave/Sleep_Modes
-## Type:        	yesno
-## Default:     	"no"
-#
-# Should we suspend to disk even if it seems the kernel in /boot
-# is not matching the running kernel? This is very dangerous, if
-# the kernels don't match, resume will not work. Use only if you
-# absolutely need to (e.g. you are compiling a custom kernel).
-#
-SUSPEND2DISK_IGNORE_KERNEL_MISMATCH=""
-
-## Path:        	System/Powermanagement/Powersave/Sleep_Modes
-## Type:        	yesno
-## Default:     	"no"
-#
-# Should we switch to a text console _in userspace_ before entering
-# a sleep mode? The kernel usually does this anyway, but if you need
-# to run some initialization code before switching back to X, this
-# might be handy. Also on ppc, the kernel does not switch, so this needs
-# to be "yes" there.
-SUSPEND2DISK_SWITCH_VT="yes"
-SUSPEND2RAM_SWITCH_VT="yes"
-STANDBY_SWITCH_VT="yes"
-
-## Path:                System/Powermanagement/Powersave/Sleep_Modes
-### Type:                integer
-### Default:             500
-##
-## The size of the image in MB that will be written to disk upon suspend.
-## A bigger image will make your system feel more responsive after resume,
-## but take additional time for writing and reading your data.
-## This value specifies the maximum image size to use. The image can be
-## smaller if not enough swap is available or memory usage is low.
-SUSPEND2DISK_IMAGE_SIZE=""
-
-## Path:                System/Powermanagement/Powersave/Sleep_Modes
-### Type:                string
-### Default:             ""
-##
-## to make sure that there is enough swap available, you can configure an
-## additional swap partition, which will only be used for suspend. This
-## partition should not be in /etc/fstab and should not normally be used.
-## Its size should be the amount of physical RAM the machine has, or at
-## least SUSPEND2DISK_IMAGE_SIZE.
-## Enter the device node of this partition here to have it activated before
-## suspend and deactivated after resume.
-## You also need to make sure that the resume= boot parameter points to
-## this partition.
-#SUSPEND2DISK_RESUME_DEVICE=""
-#
-
-# some videocards need this for suspend to ram if you want to use it set it to "yes"
-SUSPEND2RAM_VBESTATE=""
-STANDBY_VBESTATE=""
-# If you monitor doesn't turn off if you suspend set this to yes so we can use vbetool to turn it oof
-SUSPEND2RAM_USEDPMS=""
-STANDBY_USEDPMS=""
Index: extra/daemons/powersave/sleep_helper_functions-arch.patch
diff -u extra/daemons/powersave/sleep_helper_functions-arch.patch:1.1 extra/daemons/powersave/sleep_helper_functions-arch.patch:removed
--- extra/daemons/powersave/sleep_helper_functions-arch.patch:1.1	Sun Oct  1 08:54:39 2006
+++ extra/daemons/powersave/sleep_helper_functions-arch.patch	Sat Aug 25 06:10:11 2007
@@ -1,168 +0,0 @@
---- powersave-0.14.0/scripts/sleep_helper_functions	2006-09-04 12:13:55.000000000 +0200
-+++ powersave-arch/scripts/sleep_helper_functions	2006-10-01 14:21:49.000000000 +0200
-@@ -258,6 +258,11 @@
- DEFAULT_S2D_RESTART="slmodemd irda upsd apcupsd"
- DEFAULT_S2R_RESTART="slmodemd irda upsd apcupsd"
- DEFAULT_STB_RESTART="slmodemd irda upsd apcupsd"
-+if [ /etc/arch-release ]; then
-+    DEFAULT_S2D_RESTART="netfs network cups alsa"
-+    DEFAULT_S2R_RESTART="netfs network cups alsa"
-+    DEFAULT_STB_RESTART="netfs network cups alsa"    
-+fi
- 
- set_variables(){
-     case "$1" in
-@@ -269,7 +274,10 @@
-             SERVICES_TO_RESTART="${SUSPEND2DISK_RESTART_SERVICES:-$DEFAULT_S2D_RESTART}"
-             UNMOUNT_FATFS="${SUSPEND2DISK_UNMOUNT_FATFS:-yes}"
-             SWITCH_VT="$SUSPEND2DISK_SWITCH_VT"
--            ;;
-+	    if [ /etc/arch-release ]; then
-+		USE_VBESTATE="no"
-+            fi
-+	    ;;
-         suspend2ram)
-             STATE=$STATE2
-             LSMOD_LOG=$LSMOD_LOG2
-@@ -278,6 +286,10 @@
-             SERVICES_TO_RESTART="${SUSPEND2RAM_RESTART_SERVICES:-$DEFAULT_S2R_RESTART}"
-             UNMOUNT_FATFS="${SUSPEND2RAM_UNMOUNT_FATFS:-no}"
-             SWITCH_VT="$SUSPEND2RAM_SWITCH_VT"
-+	    if [ /etc/arch-release ]; then
-+		USE_VBESTATE="$SUSPEND2RAM_VBESTATE"
-+        	USE_DPMS="$SUSPEND2RAM_USEDPMS"
-+	    fi
-             ;;
-         standby)
-             STATE=$STATE3
-@@ -287,7 +299,11 @@
-             SERVICES_TO_RESTART="${STANDBY_RESTART_SERVICES:-$DEFAULT_STB_RESTART}"
-             UNMOUNT_FATFS="${STANDBY_UNMOUNT_FATFS:-no}"
-             SWITCH_VT="$STANDBY_SWITCH_VT"
--            ;;
-+            if [ /etc/arch-release ]; then
-+		USE_VBESTATE="$STANDBY_VBESTATE"
-+        	USE_DPMS="$STANDBY_USEDPMS"
-+	    fi
-+	    ;;
-         *)
-             echo "Wrong parameter '$1' in set_variables function in sleep_helper_functions script"
-             return
-@@ -367,17 +383,28 @@
-     if [ "$SERVICES_TO_RESTART" != "NONE" ]; then
-         D=false
-         for X in $SERVICES_TO_RESTART; do
--            /etc/init.d/$X status >/dev/null 2>&1 ; RET=$? # redirect needed to workaround initscript bug.
--            if [ $RET -eq 0 ]; then
--                echo "stopping $X:" >> $LSMOD_LOG
--                progress "${_M06} $X"
--                /etc/init.d/$X stop 2>&1 | awk '{print "##  "$0}' >> $LSMOD_LOG
--                echo "stopped: $X" >> $STATE
--                DEBUG "Service $X stopped" DIAG
--		D=true
--            else
--                DEBUG "Service $X stop requested but was not running. Return code: '$RET'" INFO
--            fi
-+            if [ /etc/arch-release ]; then
-+		if [ -a "/var/run/daemons/$X" ];  then
-+            	    echo "stopping $X:" >> $LSMOD_LOG
-+            	    progress "${_M06} $X"
-+            	    /etc/rc.d/$X stop 2>&1 | awk '{print "##  "$0}' >> $LSMOD_LOG
-+            	    echo "stopped: $X" >> $STATE
-+            	    DEBUG "Service $X stopped" DIAG
-+		    D=true
-+        	fi    
-+	    else
-+	    	/etc/init.d/$X status >/dev/null 2>&1 ; RET=$? # redirect needed to workaround initscript bug.
-+        	if [ $RET -eq 0 ]; then
-+            	    echo "stopping $X:" >> $LSMOD_LOG
-+            	    progress "${_M06} $X"
-+            	    /etc/init.d/$X stop 2>&1 | awk '{print "##  "$0}' >> $LSMOD_LOG
-+            	    echo "stopped: $X" >> $STATE
-+            	    DEBUG "Service $X stopped" DIAG
-+		    D=true
-+        	else
-+            	    DEBUG "Service $X stop requested but was not running. Return code: '$RET'" INFO
-+        	fi
-+	    fi
-         done
-     fi
-     $D || echo "none running." >> $LSMOD_LOG
-@@ -390,6 +417,24 @@
-         echo "ejecting PCMCIA cards..." >> $LSMOD_LOG
-         $PCCARDCTL eject
-     fi
-+    ####### Arch related 		##########
-+    #set the discs to udma0+    for ide in /proc/ide/ide?/hd?; do+        hdparm -X64 /dev/${ide##*/}+    done+    +    #### Turn screen off #####+    if [ "$USE_DPMS" = "yes" ]; then+       vbetool dpms off+    fi++    ### vbestate stuff ####+    if [ "$USE_VBESTATE" = "yes" ]; then+        vbestate_save+    fi+    
-+    #set the discs to udma0
-+    if [ /etc/arch-release ]; then
-+	for ide in /proc/ide/ide?/hd?; do
-+    	    hdparm -X64 /dev/${ide##*/}
-+	done
-+        
-+	#### Turn screen off #####
-+	if [ "$USE_DPMS" = "yes" ]; then
-+           vbetool dpms off
-+	fi
-+    
-+	### vbestate stuff ####
-+	if [ "$USE_VBESTATE" = "yes" ]; then
-+	    vbestate_save
-+	fi
-+    fi
- 
-     ####### U n l o a d   M o d u l e s ##########
-     let PERCENT+=$STEP
-@@ -448,6 +493,10 @@
- # standby
- restore_after_sleep() {
- 
-+    if [ "$USE_VBESTATE" = "yes" ]; then
-+           vbestate_restore
-+    fi
-+    
-     local D X
- 
-     [ -z $1 ] && echo "Do not invoke this script from console, it is automatically invoked by the powersave daemon" && EXIT 1
-@@ -475,8 +524,12 @@
-     # special case: hotplug should be started before inserting modules
-     if D=`awk 'BEGIN {X=1} /^stopped: (boot\.|)hotplug/ {print $2; X=0} END {exit X}' ${STATE}.resume`; then
-         echo "first starting $D:" >> $LSMOD_LOG
--        /etc/init.d/$D start 2>&1 | awk '{print "##  "$0}' >> $LSMOD_LOG
--        DEBUG "Service $D started again" DIAG
-+        if [ /etc/arch-release ]; then
-+	    /etc/rc.d/$D start 2>&1 | awk '{print "##  "$0}' >> $LSMOD_LOG
-+	else
-+	    /etc/init.d/$D start 2>&1 | awk '{print "##  "$0}' >> $LSMOD_LOG
-+        fi
-+	DEBUG "Service $D started again" DIAG
-     fi
- 
- #    echo $STATE
-@@ -505,8 +558,12 @@
-     if [ "$SERVICES_TO_RESTART" -a -s "${STATE}.resume" ]; then
-         for X in `tac ${STATE}.resume | awk '/^stopped:/ { if (($2!="hotplug")&&($2!="boot.hotplug")) print $2 }'`; do
-             echo "starting $X:" >> $LSMOD_LOG
--            /etc/init.d/$X start 2>&1 | awk '{print "##  "$0}' >> $LSMOD_LOG
--            DEBUG "Service $X started again" DIAG
-+	    if [ /etc/arch-release ]; then
-+		/etc/rc.d/$X start 2>&1 | awk '{print "##  "$0}' >> $LSMOD_LOG
-+	    else
-+	        /etc/init.d/$X start 2>&1 | awk '{print "##  "$0}' >> $LSMOD_LOG
-+            fi
-+	    DEBUG "Service $X started again" DIAG
-         done
-     fi
-     ####### S t a r t   S e r v i c e s   ##########
-@@ -514,6 +571,11 @@
-     ####### remount previously unmounted devices #######
-     remount_fatfs
- 
-+    # turn screen on
-+    if [ "$USE_DPMS" = "yes" ]; then
-+	vbetool dpms on 
-+    fi
-+    
-     $SCRIPT_RETURN $EV_ID 0 "restore_after_$1 finished"
- 
-     return 0




More information about the arch-commits mailing list