81604d724b
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.
23 lines
461 B
Bash
Executable File
23 lines
461 B
Bash
Executable File
#!/data/data/com.termux/files/usr/bin/sh
|
|
|
|
if [ $# = 0 ] && [ -f $PREFIX/etc/motd ] && [ ! -f ~/.hushlogin ]; then
|
|
cat $PREFIX/etc/motd
|
|
fi
|
|
|
|
if [ -G ~/.termux/shell ]; then
|
|
SHELL="`realpath ~/.termux/shell`"
|
|
else
|
|
for file in $PREFIX/bin/bash $PREFIX/bin/sh /system/bin/sh; do
|
|
if [ -x $file ]; then
|
|
SHELL=$file
|
|
break
|
|
fi
|
|
done
|
|
fi
|
|
|
|
if [ -f $PREFIX/lib/libtermux-exec.so ]; then
|
|
export LD_PRELOAD=$PREFIX/lib/libtermux-exec.so
|
|
fi
|
|
|
|
exec "$SHELL" -l "$@"
|