wscompat
This commit is contained in:
		| @@ -1,11 +1,17 @@ | ||||
| #!/bin/bash | ||||
| set -e | ||||
|  | ||||
| if [ ! -t 0 ]; then | ||||
|     exec /bin/ssh "$@" | ||||
| fi | ||||
|  | ||||
| if [ $# -lt 1 ]; then | ||||
| 	echo "Usage: $0 <hostname> [ssh-options]" | ||||
| 	exit 1 | ||||
| fi | ||||
|  | ||||
| [ -z "$WSCOMPAT_MASTER" ] && WSCOMPAT_MASTER="$(whoami)" | ||||
| read -r -d '' init_cmd << WSCOMPAT_EOF_9oqn7IVF | ||||
| read -r -d '' init_cmd << WSCOMPAT_EOF_9oqn7IVF || true | ||||
| 	export WS_IS_COMPAT=1 | ||||
| 	export WSCOMPAT_MASTER="$WSCOMPAT_MASTER" | ||||
| 	export WSCOMPAT_DIR="/tmp/wscompat_${WSCOMPAT_MASTER}_\$(whoami)" | ||||
| @@ -27,7 +33,7 @@ WSCOMPAT_EOF_84EbM3la | ||||
| 	. \$WSCOMPAT_DIR/profile | ||||
|  | ||||
| 	# pam, systemd - wrap in login shell | ||||
| 	exec /bin/bash --login --norc --noprofile -c "exec /bin/bash" | ||||
| 	exec /bin/bash --login --norc --noprofile -c "exec /bin/bash --rcfile \"\$WSCOMPAT_DIR/bashrc\"" | ||||
| WSCOMPAT_EOF_9oqn7IVF | ||||
|  | ||||
| /bin/ssh -t "$@" "$init_cmd" | ||||
| exec /bin/ssh -t "$@" "$init_cmd" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user