packages/utils/mksh/patches/100-dot_mkshrc
florian 7b9859cfc8 [package] mksh: update to 40d
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@31186 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-04-04 14:13:46 +00:00

39 lines
1.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

$Id$
• Part of the FreeWRT patches:
no hostname(1)
ls(1) has no -o option
• OpenWrt and FreeWRT-1.0 fix:
since this is not ~/.mkshrc make sure subshells find it
--- a/dot.mkshrc Sat Nov 26 18:15:38 2011
+++ b/dot.mkshrc Sun Dec 11 21:31:27 2011
@@ -21,7 +21,7 @@
#-
# ${ENV:-~/.mkshrc}: mksh initialisation file for interactive shells
-: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(ulimit -c 0;hostname -s 2>&-)}
+: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(</proc/sys/kernel/hostname)}
[[ $HOSTNAME = @(localhost|*([ ])) ]] && HOSTNAME=$(ulimit -c 0;hostname 2>&-)
: ${HOSTNAME:=nil}; if (( USER_ID )); then PS1='$'; else PS1='#'; fi
function precmd {
@@ -40,7 +40,7 @@ unalias ls
alias l='ls -F'
alias la='l -a'
alias ll='l -l'
-alias lo='l -alo'
+alias lo='l -al'
whence -p rot13 >&- || alias rot13='tr \
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ \
nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
@@ -365,5 +365,9 @@ alias cls='print -n \\033c'
#export LANG=C LC_CTYPE=$p LC_MEASUREMENT=$p LC_MESSAGES=$p LC_PAPER=$p
unset p
+
+# we need this in OpenWrt for subshells that are not login shells
+: ${ENV=/etc/mkshrc}
+[[ -z $ENV ]] || export ENV
: place customisations above this line