wok-6.x diff dropbear/stuff/sshx @ rev 16141

ARM: add enlightenment
author Christophe Lincoln <pankso@slitaz.org>
date Wed Mar 26 09:44:30 2014 +0100 (2014-03-26)
parents caf768bb46f9
children 58f4bd56c8de
line diff
     1.1 --- a/dropbear/stuff/sshx	Mon Feb 18 09:47:47 2013 +0100
     1.2 +++ b/dropbear/stuff/sshx	Wed Mar 26 09:44:30 2014 +0100
     1.3 @@ -16,7 +16,7 @@
     1.4  		*)		break ;;
     1.5  		esac
     1.6  	done
     1.7 -	[ -n "$1" ] || set -- "${TERM:-false} || xterm -ls"
     1.8 +	[ -n "$1" ] || set -- "${TERM:-xterm} -ls || ${TERM:-sakura} -l || xterm -ls"
     1.9  	exec dbclient -f -R $((6000+$n)):localhost:$((6000+${svr%.*})) $r \
    1.10  	   "xauth add $dpy $data; export DISPLAY=$scr; $@ ; xauth remove $dpy" \
    1.11  	   </dev/null >/dev/null
    1.12 @@ -26,19 +26,24 @@
    1.13  {
    1.14  	[ -z "$DROPBEAR_PASSWORD" ] && echo -n "ssh password: " &&
    1.15  	read -s -t 30 DROPBEAR_PASSWORD && export DROPBEAR_PASSWORD
    1.16 -	dbclient -y $1 true || exit 1
    1.17 -	ff=/tmp/pppssh$$
    1.18 +	for i in $4 ; do
    1.19 +		echo "route add -net $i dev \$1"
    1.20 +	done > /etc/ppp/ip-up.d/pppssh$$
    1.21 +	chmod +x /etc/ppp/ip-up.d/pppssh$$
    1.22 +	ssh="dbclient -y"
    1.23 +	$ssh $1 true || exit 1
    1.24  	n=10.$(($$%256)).$(($$/256))
    1.25 -	ppp="/usr/sbin/pppd local lock notty"
    1.26 -	mkfifo $ff
    1.27 -	dbclient -y $1 "$ppp ${3:-proxyarp}" <$ff | $ppp ${2:-$n.1:$n.2} >$ff
    1.28 -	rm -f $ff
    1.29 +	ppp="/usr/sbin/pppd local noauth nodetach"
    1.30 +	$ppp ${2:-$n.1:$n.2} passive pty "$ssh $1 $ppp ${3:-proxyarp} notty" \
    1.31 +		ipparam pppssh$$
    1.32 +	rm -f /etc/ppp/ip-up.d/pppssh$$
    1.33  }
    1.34  
    1.35  case "$(basename $0)" in
    1.36 -ppp*)	[ -z "$1" ] &&
    1.37 -	echo "Usage: $0 '[sshargs] user@remote' '[localip:remoteip] [localpppargs]' 'remotepppargs'" ||
    1.38 -	pppssh "$@" ;;
    1.39 +ppp*)	[ -z "$1" ] && cat <<EOT || pppssh "$@" ;;
    1.40 +Usage: $0 '[sshargs] user@remote' '[localip:remoteip] [localpppargs]' 'remotepppargs' 'routes' 
    1.41 +Example: $0 tux@slitaz.org '' '' '192.168.1.0/24 10.1.2.0/24'
    1.42 +EOT
    1.43  *)	[ -z "$DISPLAY" ] && exec dbclient "$@"
    1.44  	xauth list $DISPLAY | xdbclient "$@"
    1.45  esac