1#!/bin/sh 2[ -f /etc/banner ] && cat /etc/banner 3[ -e /tmp/.failsafe ] && cat /etc/banner.failsafe 4fgrep -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 9export PATH="%PATH%" 10export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6) 11export HOME=${HOME:-/root} 12export PS1='\u@\h:\w\$ ' 13 14[ -x /bin/more ] || alias more=less 15[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi 16 17[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc 18 19[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; } 20[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; } 21 22[ -n "$FAILSAFE" ] || { 23 for FILE in /etc/profile.d/*.sh; do 24 [ -e "$FILE" ] && . "$FILE" 25 done 26 unset FILE 27} 28