#!/bin/bash # # fnfxd Make the multimedia buttons and Fn-Key combinations # work on Toshiba laptops. # # chkconfig: 2345 10 90 # description: Make the multimedia buttons and Fn-Key combinations # work on Toshiba laptops. ### BEGIN INIT INFO # Required-Start: $local_fs # Required-Stop: $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start and stop fn-keys for toshiba laptops # Description: Make the multimedia buttons and Fn-Key combinations # work on Toshiba laptops. ### END INIT INFO # Source function library. . /etc/init.d/functions prog=fnfxd RETVAL=0 start() { echo -n $"Starting $prog: " if [ ! -d /proc/acpi/toshiba -o ! -f /proc/acpi/toshiba/keys ]; then /sbin/modprobe -s toshiba_acpi fi daemon $prog RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog } stop() { echo -n $"Shutting down $prog: " killproc $prog RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog } # See how we were called. case "$1" in start) start ;; stop) stop ;; restart) stop start ;; condrestart|force-reload|try-restart) if [ -f /var/lock/subsys/$prog ]; then stop start fi ;; status) status $prog RETVAL=$? ;; *) echo $"Usage: $0 {start|stop|restart|try-restart|reload|force-reload|status}" RETVAL=1 esac exit $RETVAL