1 From 2bee59bb9e6b142a78c94f5e77a54e4e2366c1b8 Mon Sep 17 00:00:00 2001
2 From: Thorsten Glaser <tg@freewrt.org>
3 Date: Thu, 25 Jul 2013 22:07:33 +0200
4 Subject: [PATCH] Make default mkshrc file suitable for OpenWrt environment:
6 * Part of the FreeWRT patches:
8 - ls(1) has no -o option
9 * OpenWrt and FreeWRT-1.0 fix:
10 - since this is not ~/.mkshrc make sure subshells find it
12 dot.mkshrc | 10 +++++++---
13 1 file changed, 7 insertions(+), 3 deletions(-)
15 diff --git a/dot.mkshrc b/dot.mkshrc
16 index c10b8fd..3a389b2 100644
19 @@ -28,8 +28,8 @@ case $KSH_VERSION in
23 -PS1='#'; (( USER_ID )) && PS1='$'; [[ ${HOSTNAME:=$(ulimit -c 0; hostname -s \
24 - 2>/dev/null)} = *([ ]|localhost) ]] && HOSTNAME=$(ulimit -c 0; hostname \
25 +PS1='#'; (( USER_ID )) && PS1='$'; [[ ${HOSTNAME:=$(</proc/sys/kernel/hostname
26 + )} = *([ ]|localhost) ]] && HOSTNAME=$(ulimit -c 0; hostname \
27 2>/dev/null); : ${EDITOR:=/bin/ed} ${HOSTNAME:=nil} ${TERM:=vt100}
28 : ${MKSH:=$(whence -p mksh)}; PS4='[$EPOCHREALTIME] '; PS1=$'\001\r''${|
30 @@ -50,7 +50,7 @@ unalias ls
36 alias doch='fc -ln -1 | sudo mksh -s'
37 whence -p rot13 >/dev/null || alias rot13='tr \
38 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ \
39 @@ -413,4 +413,8 @@ alias cls='print -n \\033c'
43 +# we need this in OpenWrt for subshells that are not login shells
45 +[[ -z $ENV ]] || export ENV
47 : place customisations above this line