packages/utils/mksh/patches/100-dot_mkshrc
nbd 80b0222532 upgrade mksh to R38c (patch from #5332)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@16428 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-06-12 20:24:16 +00:00

38 lines
1.1 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 has no -o
• OpenWrt fix:
since this is not ~/.mkshrc make sure subshells find it
--- mksh/dot.mkshrc~ 2009-05-31 19:17:57.000000000 +0200
+++ mksh/dot.mkshrc 2009-06-12 17:37:18.000000000 +0200
@@ -20,7 +20,7 @@
#-
# ~/.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 {
@@ -38,7 +38,7 @@ unalias ls
alias l='ls -F'
alias la='l -a'
alias ll='l -l'
-alias lo='l -alo'
+alias lo='l -al'
alias which='whence -p'
whence -p rot13 >&- || alias rot13='tr \
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ \
@@ -283,4 +283,8 @@ function Lstripcom {
done; }
}
+# we need this in OpenWrt for subshells that are not login shells
+: ${ENV=/etc/mkshrc}
+[[ -z $ENV ]] || export ENV
+
: place customsations above this line