577b63b492ca30af8b426d145c0d336158218177
[openwrt/staging/mkresin.git] / package / base-files / files / etc / profile
1 #!/bin/sh
2 [ -f /etc/banner ] && cat /etc/banner
3 [ -e /tmp/.failsafe ] && cat /etc/banner.failsafe
4
5 export PATH=/usr/bin:/usr/sbin:/bin:/sbin
6 export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
7 export HOME=${HOME:-/root}
8 export PS1='\u@\h:\w\$ '
9
10 [ -x /bin/more ] || alias more=less
11 [ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
12
13 [ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
14
15 [ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
16 [ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
17
18 [ -n "$FAILSAFE" ] || {
19 for FILE in /etc/profile.d/*.sh; do
20 [ -e "$FILE" ] && . "$FILE"
21 done
22 unset FILE
23 }