On Wed, 10 Mar 2010 13:52:50 +0800
Hongbing Hu <[email protected]> wrote:

> > There are several steps to do hibernate and resume from it. We have
> > a scripts which are called by gui(kpowersave or fnkey) to automatic
> > it.
> > 
> > Huhongbin:
> >   Please tell rms what need to do support hibernate.
> 
> I'm sorry to reply so late.
> 
> when you do hibernation, before and after, you need to do something.
> 
> Attachment is shell scripts.

I've attached the diff from what was sent to the list vs what I've
included in the package.

Changes:
 - use /bin/sh
 - remove useless cat
 - make script posix (i think), also fixes an issue where "\n" was
printed instead of an actual newline

thanks,
kk

-- 
Karl Goetz, (Kamping_Kaiser / VK5FOSS)
Debian contributor / gNewSense Maintainer
http://www.kgoetz.id.au
No, I won't join your social networking group
=== modified file 'pm/sleep.d/99yeeloong'
--- pm/sleep.d/99yeeloong	2010-03-11 00:55:11 +0000
+++ pm/sleep.d/99yeeloong	2010-03-11 01:08:00 +0000
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # This script fix some known issues in yeeloong after resume 
 # issues after resume:
 # 	1:when we use the camera, machine can not hibernated 
@@ -11,7 +11,7 @@
 #Check the system is yeeloong or not 
 if [ -f /proc/cpuinfo ]
 then
- 	cat /proc/cpuinfo |grep yeeloong
+ 	grep -c yeeloong /proc/cpuinfo
 	if [ "$?" -ne "0" ]
 	then
 		exit
@@ -27,17 +27,17 @@
 {
 if [ x$swap_part = x"" ]
 then
-	echo "no swap partition"
+	echo "No swap partition"
 	return 1;
 fi
 OLD_GOVERNOR=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
-echo performance >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
 sync
 device="/dev/video0"
-if fuser  -s $device   #kill the process which uses camera
+if fuser -s $device   #kill the process which uses camera
 then
 	(fuser -s -k -9 $device 2>/dev/null || sleep 1) \
-	&& (echo "unable kill \n" || exit -1)
+	&& (printf "unable to kill fuser\n" || exit -1)
 fi
 ifconfig $eth_infterface down
 ifconfig $wlan_infterface down

Attachment: signature.asc
Description: PGP signature

_______________________________________________
gNewSense-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/gnewsense-dev

Reply via email to