2017-02-12 21:01:01 +01:00
|
|
|
#!/data/data/com.termux/files/usr/bin/sh
|
|
|
|
|
2017-09-17 22:43:03 +02:00
|
|
|
if [ $# = 0 ] && [ -f $PREFIX/etc/motd ] && [ ! -f ~/.hushlogin ]; then
|
2017-02-12 21:01:01 +01:00
|
|
|
cat $PREFIX/etc/motd
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -G ~/.termux/shell ]; then
|
2018-07-14 00:02:50 +02:00
|
|
|
export SHELL="`realpath ~/.termux/shell`"
|
2017-02-12 21:01:01 +01:00
|
|
|
else
|
|
|
|
for file in $PREFIX/bin/bash $PREFIX/bin/sh /system/bin/sh; do
|
|
|
|
if [ -x $file ]; then
|
2018-07-14 00:02:50 +02:00
|
|
|
export SHELL=$file
|
2017-02-12 21:01:01 +01:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2017-09-17 16:12:20 +02:00
|
|
|
if [ -f $PREFIX/lib/libtermux-exec.so ]; then
|
|
|
|
export LD_PRELOAD=$PREFIX/lib/libtermux-exec.so
|
2018-02-21 00:08:15 +01:00
|
|
|
$SHELL -c "busybox true" > /dev/null 2>&1 || unset LD_PRELOAD
|
2017-09-17 16:12:20 +02:00
|
|
|
fi
|
|
|
|
|
2017-09-17 22:43:03 +02:00
|
|
|
exec "$SHELL" -l "$@"
|