Use bash as login shell by default

This commit is contained in:
Fredrik Fornwall 2015-07-30 19:47:00 -04:00
parent bb8ed8ff10
commit 02b55df699
5 changed files with 8 additions and 5 deletions

View File

@ -11,7 +11,7 @@ diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/incl
#define _PATH_PASSWD "/etc/passwd"
#define _PATH_MASTERPASSWD "/etc/master.passwd"
#define _PATH_MASTERPASSWD_LOCK "/etc/ptmp"
@@ -119,6 +122,39 @@
@@ -119,6 +122,41 @@
int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);
int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);
@ -24,7 +24,9 @@ diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/incl
+ static char realpath_buffer[4096/*PATH_MAX*/];
+ char* result = realpath("@TERMUX_HOME@/.termux/shell", realpath_buffer);
+ if (result == NULL || access(realpath_buffer, X_OK) == -1) {
+ pw->pw_shell = "@TERMUX_PREFIX@/bin/ash";
+ char const* bash_path = "@TERMUX_PREFIX@/bin/bash";
+ if (access(bash_path, X_OK) != -1) pw->pw_shell = bash_path;
+ else pw->pw_shell = "@TERMUX_PREFIX@/bin/ash";
+ } else {
+ pw->pw_shell = realpath_buffer;
+ }

View File

@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=http://www.busybox.net/
TERMUX_PKG_DESCRIPTION="Tiny versions of many common UNIX utilities into a single small executable"
TERMUX_PKG_ESSENTIAL=yes
TERMUX_PKG_VERSION=1.23.2
TERMUX_PKG_BUILD_REVISION=2
TERMUX_PKG_BUILD_REVISION=3
TERMUX_PKG_SRCURL=http://www.busybox.net/downloads/busybox-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_BUILD_IN_SRC=yes

View File

@ -1,6 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://matt.ucc.asn.au/dropbear/dropbear.html
TERMUX_PKG_DESCRIPTION="Small SSH server and client"
TERMUX_PKG_VERSION=2015.67
TERMUX_PKG_BUILD_REVISION=1
# Using mirror since main site was down 2015-06-13:
# TERMUX_PKG_SRCURL=https://matt.ucc.asn.au/dropbear/releases/dropbear-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SRCURL=https://dropbear.nl/mirror/dropbear-${TERMUX_PKG_VERSION}.tar.bz2

View File

@ -1,7 +1,7 @@
TERMUX_PKG_HOMEPAGE=http://www.openssh.com/
TERMUX_PKG_DESCRIPTION="Secure shell for logging into a remote machine"
TERMUX_PKG_VERSION=6.9
TERMUX_PKG_BUILD_REVISION=1
TERMUX_PKG_BUILD_REVISION=2
TERMUX_PKG_SRCURL=http://ftp.eu.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${TERMUX_PKG_VERSION}p1.tar.gz
TERMUX_PKG_DEPENDS="libandroid-support, ldns, openssl"
# --disable-strip to prevent host "install" command to use "-s", which won't work for target binaries:

View File

@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=http://tmux.github.io/
TERMUX_PKG_DESCRIPTION="Terminal multiplexer implementing switching between several programs in one terminal, detaching them and reattaching them to a different terminal"
TERMUX_PKG_DEPENDS="ncurses, libevent"
TERMUX_PKG_VERSION=2.0
TERMUX_PKG_BUILD_REVISION=1
TERMUX_PKG_BUILD_REVISION=2
TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/tmux/tmux/tmux-${TERMUX_PKG_VERSION}/tmux-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_BUILD_IN_SRC=yes