Browse Source

termux-tools: Make bin/login handle arguments

As we now use bin/login even from e.g. sshd we need to handle
arguments by forwarding it to the login shell and not displaying
a motd in that case. Fixes #1529.
android-5
Fredrik Fornwall 7 years ago
parent
commit
2cac774bfb
  1. 2
      packages/termux-tools/build.sh
  2. 5
      packages/termux-tools/login

2
packages/termux-tools/build.sh

@ -1,6 +1,6 @@
TERMUX_PKG_HOMEPAGE=https://termux.com/
TERMUX_PKG_DESCRIPTION="Basic system tools for Termux"
TERMUX_PKG_VERSION=0.45
TERMUX_PKG_VERSION=0.46
TERMUX_PKG_PLATFORM_INDEPENDENT=yes
TERMUX_PKG_CONFFILES="etc/motd"

5
packages/termux-tools/login

@ -1,6 +1,6 @@
#!/data/data/com.termux/files/usr/bin/sh
if [ -f $PREFIX/etc/motd ] && [ ! -f ~/.hushlogin ]; then
if [ $# = 0 ] && [ -f $PREFIX/etc/motd ] && [ ! -f ~/.hushlogin ]; then
cat $PREFIX/etc/motd
fi
@ -19,5 +19,4 @@ if [ -f $PREFIX/lib/libtermux-exec.so ]; then
export LD_PRELOAD=$PREFIX/lib/libtermux-exec.so
fi
exec "$SHELL" -l
exec "$SHELL" -l "$@"

Loading…
Cancel
Save