You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.8 KiB

  1. From 23712cea8e2a623fd952eb781df0011c501703d0 Mon Sep 17 00:00:00 2001
  2. From: Thorsten Glaser <tg@mirbsd.org>
  3. Date: Thu, 25 Jul 2013 22:07:33 +0200
  4. Subject: [PATCH] Make default mkshrc file suitable for OpenWrt environment:
  5. * Part of the FreeWRT patches:
  6. - no hostname(1)
  7. - ls(1) has no -o option
  8. * OpenWrt and FreeWRT-1.0 fix:
  9. - since this is not ~/.mkshrc make sure subshells find it
  10. From: Alif M. A. <alive4ever@live.com>
  11. Date: Thu, 20 Jul 2017 14:52:39 +0000
  12. Subject: [PATCH] Refresh 100-dot_mkshrc for mksh-R55
  13. Additional changes of the patch as of mksh-R55
  14. * Use content of `/proc/sys/kernel/hostname` to set `$HOSTNAME`, since
  15. `hostname` applet isn't compiled into `busybox`.
  16. * Use `/bin/vi` as fallback `$EDITOR`.
  17. * Use `/etc/mkshrc` as default startup file, so there is no need to
  18. manually source it during interactive session.
  19. From: Alif M. A. <alive4ever@live.com>
  20. Date: Thu, 11 Jan 2018 02:13:46 +0000
  21. Subject: [PATCH] Refresh 100-dot_mkshrc for mksh-R55
  22. Refreshed 100-dot_mkshrc for mksh-r56b
  23. ---
  24. Reviewed-by: Thorsten Glaser <tg at mirbsd.org>
  25. Signed-off-by: Alif M. A. <alive4ever at live.com>
  26. --- a/dot.mkshrc
  27. +++ b/dot.mkshrc
  28. @@ -63,10 +63,9 @@
  29. EDITOR=
  30. done
  31. -\\builtin alias ls=ls l='ls -F' la='l -a' ll='l -l' lo='l -alo'
  32. -\: "${HOSTNAME:=$(\\builtin ulimit -c 0; \\builtin print -r -- $(hostname \
  33. - 2>/dev/null))}${EDITOR:=/bin/ed}${TERM:=vt100}${USER:=$(\\builtin ulimit \
  34. - -c 0; id -un 2>/dev/null)}${USER:=?}"
  35. +\\builtin alias ls=ls l='ls -F' la='l -a' ll='l -l' lo='l -al'
  36. +\: "${HOSTNAME:=$(</proc/sys/kernel/hostname)}${EDITOR:=/bin/vi}${TERM:=vt100}\
  37. + ${USER:=$(\\builtin ulimit -c 0; id -un 2>/dev/null)}${USER:=?}"
  38. [[ $HOSTNAME = ?(?(ip6-)localhost?(6)) ]] && HOSTNAME=nil; \\builtin unalias ls
  39. \\builtin export EDITOR HOSTNAME TERM USER