profile 814 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. [ -f /etc/banner ] && cat /etc/banner
  3. [ -e /tmp/.failsafe ] && cat /etc/banner.failsafe
  4. fgrep -sq '/ overlay ro,' /proc/mounts && {
  5. echo 'Your JFFS2-partition seems full and overlayfs is mounted read-only.'
  6. echo 'Please try to remove files from /overlay/upper/... and reboot!'
  7. }
  8. export PATH="%PATH%"
  9. export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
  10. export HOME=${HOME:-/root}
  11. export PS1='\u@\h:\w\$ '
  12. [ -x /bin/more ] || alias more=less
  13. [ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
  14. [ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
  15. [ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
  16. [ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
  17. [ -n "$FAILSAFE" ] || {
  18. for FILE in /etc/profile.d/*.sh; do
  19. [ -e "$FILE" ] && . "$FILE"
  20. done
  21. unset FILE
  22. }