OSDN Git Service

adbd sets HOME/LOGNAME/SHELL/USER now.
authorElliott Hughes <enh@google.com>
Mon, 2 Nov 2015 21:32:07 +0000 (13:32 -0800)
committerElliott Hughes <enh@google.com>
Mon, 2 Nov 2015 22:40:16 +0000 (14:40 -0800)
We also don't need to export variables we inherited --- they're
automatically exported.

Bug: http://b/19635681
Change-Id: Ie8e8480e7487ddc0fb9e984235b8b5ea0c587686

mkshrc

diff --git a/mkshrc b/mkshrc
index b2bc13b..cefafe7 100644 (file)
--- a/mkshrc
+++ b/mkshrc
@@ -6,15 +6,11 @@
 #
 # Support: https://launchpad.net/mksh
 
-: ${HOME:=/data}
 : ${HOSTNAME:=$(getprop ro.product.device)}
 : ${HOSTNAME:=android}
-: ${MKSH:=/system/bin/sh}
-: ${SHELL:=$MKSH}
 : ${TERM:=xterm}
 : ${TMPDIR:=/data/local/tmp}
-: ${USER:=$(id -un)}
-export HOME HOSTNAME MKSH SHELL TERM TMPDIR USER
+export HOSTNAME TERM TMPDIR
 
 if (( USER_ID )); then PS1='$'; else PS1='#'; fi
 PS4='[$EPOCHREALTIME] '; PS1='${|
@@ -23,4 +19,4 @@ PS4='[$EPOCHREALTIME] '; PS1='${|
        (( e )) && REPLY+="$e|"
 
        return $e
-}$USER@$HOSTNAME:${PWD:-?} '"$PS1 "
+}$HOSTNAME:${PWD:-?} '"$PS1 "