From: gobo72 Date: Sun, 4 Sep 2011 20:41:02 +0000 (+0000) Subject: Enlevé références à sony Vaio, et teste la présence de /proc/acpi/button/lid/LID... X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=142c1bfb998e405aaaf5383b1fb8e9a49b8c0745;p=hvlinux.git Enlevé références à sony Vaio, et teste la présence de /proc/acpi/button/lid/LID/state avant de le lire --- 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"