This repository has been archived on 2026-01-16. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
apmud/trackpad.init

63 lines
1.1 KiB
Bash
Executable file

#!/bin/sh
#
# trackpad This shell script takes care configuring the trackpad
#
# chkconfig: 345 30 70
# description: set trackpad defaults from /etc/sysconfig/trackpad
# Source function library.
. /etc/init.d/functions
RETVAL=0
start() {
if grep -i "PowerBook" /proc/cpuinfo >/dev/null; then
if [ -f /etc/sysconfig/trackpad -a -x /usr/bin/trackpad ]; then
. /etc/sysconfig/trackpad
if [ -n "$TRACKPAD_OPT" ]; then
action "Setting default trackpad options" \
/usr/bin/trackpad $TRACKPAD_OPT
fi
fi
fi
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/trackpad
return $RETVAL
}
stop() {
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/trackpad
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status trackpad
RETVAL=$?
;;
restart|reload)
stop
start
RETVAL=$?
;;
condrestart)
if [ -f /var/lock/subsys/trackpad ]; then
stop
start
RETVAL=$?
fi
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac
exit $RETVAL