Update of /cvsroot/devil-linux/build/scripts/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20987/scripts/scripts
Modified Files:
setup
Added Files:
gpm
Log Message:
initial checkin of GPM
--- NEW FILE: gpm ---
#!/bin/bash
#
# $Source: /cvsroot/devil-linux/build/scripts/scripts/gpm,v $
# $Revision: 1.1 $
# $Date: 2004/03/08 18:50:34 $
#
# http://www.devil-linux.org
#
### BEGIN INIT INFO
# Provides: gpm
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start:
# Default-Stop:
# Description: starts something
### END INIT INFO
# settings
source /etc/sysconfig/config
# parameters
NAME="gpm"
CONFIGNAME=GPM
DAEMON=/usr/sbin/gpm
PARAMETER="-m $MOUSE_DEV -t $MOUSE_TYPE"
# source function library
source /etc/init.d/functions
eval START=\$START_$CONFIGNAME
# Determine the base and follow a runlevel link name.
base=${0##*/}
link=${base#*[SK][0-9][0-9]}
# Force execution if not called by a runlevel directory.
test $link = $base && START=yes
test "$START" = "yes" || exit 0
if [ ! -e $DAEMON ]; then
echo
echo "$DAEMON not found. Did you install the package?"
exit 1
fi
case "$1" in
start)
echo -n "Starting $NAME: "
loadproc $DAEMON $PARAMETER
;;
stop)
echo -n "Shutting down $NAME: "
killproc $DAEMON
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
Index: setup
===================================================================
RCS file: /cvsroot/devil-linux/build/scripts/scripts/setup,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- setup 3 Mar 2004 16:34:22 -0000 1.19
+++ setup 8 Mar 2004 18:50:34 -0000 1.20
@@ -124,7 +124,7 @@
[ $RETURN -eq 0 ] && mod_config $CONFIG TIMEZONE $(cat $RESULT)
}
-# Select yoru syslog daemon
+# Select your syslog daemon
syslogd() {
S1=off
S2=off
@@ -138,6 +138,35 @@
mod_config $CONFIG SYSLOG_DAEMON $(cat $RESULT)
}
+# Select your mouse type
+mousetype() {
+ unset mman ms bare brw cal calr exps2 imps2 logi logim mm ms3 msc ncr netmouse pnp ps2 syn synps2
+ eval $MOUSE_TYPE=on
+ $DIALOG --title "SYSLOG" --backtitle "$BACKTITLE" \
+ --radiolist "Select your Mouse type" 0 0 0 \
+ "mman" "The "MouseMan" and similar devices (3/4 bytes per packet)." ${mman:-off} \
+ "ms" "The original ms protocol, with a middle-button extension." ${ms:-off} \
+ "bare" "Unadorned ms protocol. Needed with some 2-buttons mice." ${bare:-off} \
+ "brw" "Fellowes Browser - 4 buttons (and a wheel) (dual protocol?)" ${brw:-off} \
+ "cal" "Calcomp UltraSlate" ${cal:-off} \
+ "calr" "Calcomp UltraSlate - relative mode" ${cal:-off} \
+ "exps2" "IntelliMouse Explorer (ps2) - 3 buttons, wheel unused" ${exps2:-off} \
+ "imps2" "Microsoft Intellimouse (ps2)-autodetect 2/3 buttons,wheel unused" ${imps2:-off} \
+ "logi" "Used in some Logitech devices (only serial)." ${logi:-off} \
+ "logim" "Turn logitech into Mouse-Systems-Compatible." ${logim:-off} \
+ "mm" "MM series. Probably an old protocol..." ${mm:-off} \
+ "ms3" "Microsoft Intellimouse (serial) - 3 buttons, wheel unused" ${ms3:-off} \
+ "msc" "Mouse-Systems-Compatible (5bytes). Most 3-button mice." ${msc:-off} \
+ "ncr" "Ncr3125pen, found on some laptops" ${ncr:-off} \
+ "netmouse" "Genius NetMouse (ps2) - 2 buttons and 2 buttons 'up'/'down'." ${netmouse:-off} \
+ "pnp" "Plug and pray. New mice may not run with '-t ms'." ${pnp:-off} \
+ "ps2" "Busmice of the ps/2 series. Most busmice, actually." ${ps2:-off} \
+ "syn" "The "Synaptics" serial TouchPad." ${syn:-off} \
+ "synps2" "The "Synaptics" PS/2 TouchPad." ${synps2:-off} \
+ 2> $RESULT && \
+ mod_config $CONFIG MOUSE_TYPE $(cat $RESULT)
+}
+
# Select your keyboard map
keyboard() {
if [ -d /usr/share/kbd/keymaps/i386/ ]; then
@@ -249,6 +278,8 @@
Domain "Domain Name [$DOMAIN] " \
TIMEZONE "Timezone [$TIMEZONE] " \
KEYBOARD "Keyboard Layout [$KEYBOARD_LAYOUT] " \
+ MOUSED "Mouse Device [$MOUSE_DEV] " \
+ MOUSET "Mouse Type [$MOUSE_TYPE] " \
SYSLOG "SYSLOG [$SYSLOG_DAEMON] " \
SYSLOGPARM "Additional parameters for $SYSLOG_DAEMON [$SYSLOGD_PARAM] " \
INITRD "Modules to be loaded in the initial ramdisk [$INITRD_MODULES] " \
@@ -296,6 +327,13 @@
KEYBOARD)
keyboard
;;
+ MOUSET)
+ mousetype
+ ;;
+ MOUSED)
+ inputbox "Mouse Device" "Mouse Device file" "$MOUSE_DEV" && \
+ mod_config $CONFIG MOUSE_DEV "$(cat $RESULT)"
+ ;;
SYSLOG)
syslogd
;;
|