uncommited

This commit is contained in:
2025-10-02 07:46:48 +00:00
parent 4b4d7a684c
commit 316a3ff9e4
11 changed files with 132 additions and 22 deletions

View File

@@ -1,10 +1,6 @@
#!/bin/bash
set -e
if [ ! -t 0 ]; then
exec /bin/ssh "$@"
fi
if [ $# -lt 1 ]; then
echo "Usage: $0 <hostname> [ssh-options]"
exit 1
@@ -15,11 +11,7 @@ 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)"
ws_cleanup() { rm -rf "\$WSCOMPAT_DIR"; }
trap ws_cleanup EXIT
rm -rf "\$WSCOMPAT_DIR" && mkdir -p "\$WSCOMPAT_DIR" && chmod 700 "\$WSCOMPAT_DIR"
cat << 'WSCOMPAT_EOF_84EbM3la' > "\$WSCOMPAT_DIR/profile"
$(
sed 's/WSCOMPAT_EOF_/WSCOMPAT_EOF__/g' "$WSCOMPAT_DIR/profile"
@@ -31,7 +23,6 @@ $(
)
WSCOMPAT_EOF_84EbM3la
. \$WSCOMPAT_DIR/profile
# pam, systemd - wrap in login shell
exec /bin/bash --login --norc --noprofile -c "exec /bin/bash --rcfile \"\$WSCOMPAT_DIR/bashrc\""
WSCOMPAT_EOF_9oqn7IVF