#! /bin/sh set -e PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DESC="Omnibook utilities" NAME="omnibok" BIN=/usr/local/sbin/$NAME SCRIPTNAME=/etc/init.d/$NAME SETK=/usr/bin/setkeycodes # Gracefully exit if the package has been removed. test -x $DAEMON || exit 0 # # Function that starts the daemon/service. # d_start() { # This is for shdci and mmc_block modules # disables FlashMedia SD setpci -s 06:04.3 4c=0x22 #$BIN -k 1 >/dev/null || exit 1 # musicplayer $SETK e013 129 # play/pause $SETK e077 130 # stop $SETK e012 131 # next $SETK e039 132 # previous $SETK e074 133 # fn+f1 $SETK e06e 134 # fn+f2 $SETK e064 135 # fn+f3 $SETK e017 136 # fn+f4 $SETK e018 137 # fn+f5 #$SETK e041 138 # fn+f8 $SETK e016 139 # fn+space $SETK e043 140 # fn+1 $SETK e01a 141 # fn+2 $SETK e01b 142 } # # Function that stops the daemon/service. # d_stop() { $BIN -k 0 >/dev/null || exit 1 } case "$1" in start) echo -n "Starting $DESC: $NAME" d_start echo "." ;; stop) echo -n "Stopping $DESC: $NAME" d_stop echo "." ;; restart|force-reload) # # If the "reload" option is implemented, move the "force-reload" # option to the "reload" entry above. If not, "force-reload" is # just the same as "restart". # echo -n "Restarting $DESC: $NAME" d_stop # One second might not be time enough for a daemon to stop, # if this happens, d_start will fail (and dpkg will break if # the package is being upgraded). Change the timeout if needed # be, or change d_stop to have start-stop-daemon use --retry. # Notice that using --retry slows down the shutdown process somewhat. sleep 1 d_start echo "." ;; *) echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0