#!/bin/bash # # /etc/rc.d/init.d/ibm_acpi # # Starts the acpi daemon # # chkconfig: 12345 43 - # description: Enable IBM ThinkPad Hotkeys to work. # http://ibm-acpi.sf.net/README # Source function library. . /etc/rc.d/init.d/functions /sbin/lsmod | grep -q ^ibm_acpi || exit 0 [ -f /proc/acpi/ibm/hotkey ] || exit 0 RETVAL=0 start() { echo -n $"Configuring ibm_acpi hotkey: " echo enable > /proc/acpi/ibm/hotkey echo 0xffff > /proc/acpi/ibm/hotkey RETVAL=$? echo return $RETVAL } reset() { echo -n $"Reseting ibm_acpi hotkey: " echo reset > /proc/acpi/ibm/hotkey RETVAL=$? echo return $RETVAL } case "$1" in start) start ;; stop) ;; reset) reset ;; status) if [ -f /proc/acpi/ibm/hotkey ]; then cat /proc/acpi/ibm/hotkey fi ;; *) echo $"Usage: $0 {start|reset|status}" exit 1 esac exit $RETVAL