c203611510
This is to be used by vendor processes. Particularly, vendor shell scripts that get launched as init services. The shell is restricted from running as interactive mode in SEPolicy. Unless it is launched from rooted system shell. The change also adds the ability to override the default $PATH regardless of the environment. Bug: 36463595 Test: Boot sailfish with new shell and ensure all init services exit with status 0 Change-Id: I1eaf2c8a8f6905caf00d53e067add67eaea00e09 Signed-off-by: Sandeep Patil <sspatil@google.com>
20 lines
459 B
Text
20 lines
459 B
Text
# Copyright (c) 2010, 2012, 2013, 2014
|
|
# Thorsten Glaser <tg@mirbsd.org>
|
|
# This file is provided under the same terms as mksh.
|
|
#-
|
|
# Minimal /system/etc/mkshrc for Android
|
|
#
|
|
# Support: https://launchpad.net/mksh
|
|
|
|
: ${HOSTNAME:=$(getprop ro.product.device)}
|
|
: ${HOSTNAME:=android}
|
|
export HOSTNAME
|
|
|
|
if (( USER_ID )); then PS1='$'; else PS1='#'; fi
|
|
PS4='[$EPOCHREALTIME] '; PS1='${|
|
|
local e=$?
|
|
|
|
(( e )) && REPLY+="$e|"
|
|
|
|
return $e
|
|
}$HOSTNAME:${PWD:-?} '"$PS1 "
|