From 142c1bfb998e405aaaf5383b1fb8e9a49b8c0745 Mon Sep 17 00:00:00 2001 From: gobo72 Date: Sun, 4 Sep 2011 20:41:02 +0000 Subject: [PATCH] =?utf8?q?Enlev=C3=A9=20r=C3=A9f=C3=A9rences=20=C3=A0=20so?= =?utf8?q?ny=20Vaio,=20et=20teste=20la=20pr=C3=A9sence=20de=20/proc/acpi/b?= =?utf8?q?utton/lid/LID/state=20avant=20de=20le=20lire?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- stage2/misc/acpi/suspend2ram.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/stage2/misc/acpi/suspend2ram.sh b/stage2/misc/acpi/suspend2ram.sh index 11cd412..af34af6 100755 --- a/stage2/misc/acpi/suspend2ram.sh +++ b/stage2/misc/acpi/suspend2ram.sh @@ -1,8 +1,10 @@ #!/bin/sh -if grep -q open /proc/acpi/button/lid/LID/state; then - # Do not act on lid opened event. Only on lid closed. - exit 0 +if [ -f /proc/acpi/button/lid/LID/state ]; then + if grep -q open /proc/acpi/button/lid/LID/state; then + # Do not act on lid opened event. Only on lid closed. + exit 0 + fi fi # discover video card's ID @@ -20,7 +22,6 @@ sync cat /proc/bus/pci/$ID > $TMP_FILE # Stopping network. -# Sony VAIO PCG-Z505RX and PCMCIA Linksys wifi card /etc/rc.d/init.d/network stop echo "Entering suspend mode" -- 2.20.1