Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > d1ba75dd6acda59fe30fd6769a94cb56 > files > 9

apmud-1.0.0-11.fc12.src.rpm

#!/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