wok diff dropbear/stuff/sshx @ rev 19981

Up gphoto2 (2.5.14), thanks Pasquale
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jun 18 19:23:12 2017 +0200 (2017-06-18)
parents 2c28bb804604
children 0bbf3f773324
line diff
     1.1 --- a/dropbear/stuff/sshx	Sun Mar 12 10:46:58 2017 +0100
     1.2 +++ b/dropbear/stuff/sshx	Sun Jun 18 19:23:12 2017 +0200
     1.3 @@ -6,19 +6,25 @@
     1.4  	svr=${DISPLAY#*:}
     1.5  	n=$((10+($RANDOM % 90))); dpy=localhost:$n
     1.6  	scr=${DISPLAY/${DISPLAY%.*}/$dpy}
     1.7 -	r=""
     1.8 +	r="" ; p="22"; k=""
     1.9  	while true; do
    1.10  		a="$1"
    1.11  		r="$r $1"; shift
    1.12  		case "$a" in
    1.13 +		-p)	p=$1 ;;
    1.14 +		-i)	k="$k-i $1 " ;;
    1.15 +		esac
    1.16 +		case "$a" in
    1.17  		-[piIlLRWKBJ])	r="$r $1"; shift;;
    1.18  		-*)		;;
    1.19  		*)		break ;;
    1.20  		esac
    1.21  	done
    1.22  	xhost +localhost > /dev/null 2>&1
    1.23 +	pxypass="${DBPROXY_PASSWORD:+export DROPBEAR_PASSWORD=$DBPROXY_PASSWORD; }"
    1.24  	[ -n "$1" ] || set -- "${TERM:-xterm} -ls || ${TERM:-sakura} -l || xterm -ls"
    1.25  	exec dbclient -f -R $((6000+$n)):localhost:$((6000+${svr%.*})) $r \
    1.26 +	   ${DBPROXY:+-J "sh -c '${pxypass}dbclient ${k}-B ${a#*@}:$p $DBPROXY'"} \
    1.27  	   "xauth add $dpy $data; export DISPLAY=$scr; $@ ; xauth remove $dpy" \
    1.28  	   </dev/null >/dev/null
    1.29  }