Package: hotkey-setup
Version: 0.1-18
Severity: normal
Tags: patch

If video.ko is not loaded, /proc/acpi/video/*/DOS does not exist and
the init script tries to write to "/proc/acpi/video/*/DOS" (literally,
with the asterisk), which of course fails.

This patch adds a check for the existence of the file to be written:

diff --git a/debian/init.d b/debian/init.d
index a7103b0..3fb91d8 100755
--- a/debian/init.d
+++ b/debian/init.d
@@ -25,7 +25,9 @@ do_video () {
     case $VIDEO in
        intel|ati|radeon)
            for x in /proc/acpi/video/*/DOS; do
-               echo -n 4 >$x;
+               if [ -e "$x" ]; then
+                       echo -n 4 >$x;
+               fi
            done
        ;;
     esac

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-rc7-smapi-x61s-ge35ea4c5 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages hotkey-setup depends on:
ii  console-tools [console-uti 1:0.2.3dbs-65 Linux console and font utilities
ii  dmidecode                  2.9-1         Dump Desktop Management Interface 
ii  laptop-detect              0.13.4        attempt to detect a laptop

hotkey-setup recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to