profile 1023 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. [ -e /tmp/.failsafe ] && export FAILSAFE=1
  2. [ -f /etc/banner ] && cat /etc/banner
  3. [ -n "$FAILSAFE" ] && cat /etc/banner.failsafe
  4. grep -Fsq '/ 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. export ENV=/etc/shinit
  13. case "$TERM" in
  14. xterm*|rxvt*)
  15. export PS1='\[\e]0;\u@\h: \w\a\]'$PS1
  16. ;;
  17. esac
  18. [ -n "$FAILSAFE" ] || {
  19. for FILE in /etc/profile.d/*.sh; do
  20. [ -e "$FILE" ] && . "$FILE"
  21. done
  22. unset FILE
  23. }
  24. if ( grep -qs '^root::' /etc/shadow && \
  25. [ -z "$FAILSAFE" ] )
  26. then
  27. cat << EOF
  28. === WARNING! =====================================
  29. There is no root password defined on this device!
  30. Use the "passwd" command to set up a new password
  31. in order to prevent unauthorized SSH logins.
  32. --------------------------------------------------
  33. EOF
  34. fi