#!/bin/sh
#
# GUI Skript fuer mops...
#
#############################

PATH="$PATH:/bin:/sbin:/opt/QtPalmtop/bin"

/opt/QtPalmtop/bin/opie-sh -g -m -M "mops<br>management<br>console<br>" -0 " Start " -1 " Stop " -2 "Debug" -t "mops" 

case $? in
	0)
	udhcpc -i wlan0
	/sbin/vpnc-connect 
	ifconfig vpnlink | /opt/QtPalmtop/bin/opie-sh -g -f -t "VPN Aufbau:"
	;;
	1)
	/sbin/vpnc-disconnect
	killall udhcpc
	;;
	2)
	RC=0
	while test $RC != 2; do
		/opt/QtPalmtop/bin/opie-sh -g -m -t "Debug" -M "What kind of debug information<br>do you want to see?" -0 " ifconfig " -1 " route " -2 " Quit "
		case $? in
			0)
			ifconfig | /opt/QtPalmtop/bin/opie-sh -g -f -t "ifconfig output"
			;;
	                1)
	                route -n | /opt/QtPalmtop/bin/opie-sh -g -f -t "route -n output"
        	        ;;
		esac
		RC=$?;
	done
esac

