Browse Source

termux-tools: do not start login shell if not running on terminal

Fixes execution of commands via non-interactive shell with OpenSSH.
Issue https://github.com/termux/termux-packages/issues/3620.
emacs-27
Leonid Plyushch 6 years ago
parent
commit
9ba4d9fdd3
  1. 2
      packages/termux-tools/build.sh
  2. 4
      packages/termux-tools/login

2
packages/termux-tools/build.sh

@ -1,7 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://termux.com/
TERMUX_PKG_DESCRIPTION="Basic system tools for Termux"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_VERSION=0.61
TERMUX_PKG_VERSION=0.62
TERMUX_PKG_PLATFORM_INDEPENDENT=yes
TERMUX_PKG_ESSENTIAL=yes
TERMUX_PKG_DEPENDS="termux-am"

4
packages/termux-tools/login

@ -20,4 +20,8 @@ if [ -f $PREFIX/lib/libtermux-exec.so ]; then
$SHELL -c "busybox true" > /dev/null 2>&1 || unset LD_PRELOAD
fi
if [ -n "$TERM" ]; then
exec "$SHELL" -l "$@"
else
exec "$SHELL" "$@"
fi

Loading…
Cancel
Save