profile 897 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. unset FAILSAFE
  2. [ -e /tmp/.failsafe ] && export FAILSAFE=1
  3. [ -f /etc/banner ] && cat /etc/banner
  4. [ -n "$FAILSAFE" ] && [ -f /etc/banner.failsafe ] && cat /etc/banner.failsafe
  5. if grep -Fsq '/ overlay ro,' /proc/mounts ; then
  6. cat << EOF
  7. === WARNING! ======================================
  8. Your JFFS2-partition seems full and overlayfs is
  9. mounted as READ-ONLY!
  10. Please try to remove files from /overlay/upper/...
  11. and reboot!
  12. ---------------------------------------------------
  13. EOF
  14. fi
  15. export PATH="%PATH%"
  16. HOME=$(grep -E "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
  17. HOME=${HOME:-/root}
  18. export HOME
  19. export PS1='\u@\h:\w\$ '
  20. export ENV=/etc/shinit
  21. case "$TERM" in
  22. xterm*|rxvt*)
  23. export PS1='\[\e]0;\u@\h: \w\a\]'"$PS1"
  24. ;;
  25. esac
  26. if [ -z "$FAILSAFE" ] ; then
  27. for FILE in /etc/profile.d/*.sh ; do
  28. [ -f "${FILE%.sh}.hush" ] && continue
  29. [ -f "$FILE" ] && . "$FILE"
  30. done
  31. unset FILE
  32. fi