2018-01-03 22:12:02 +00:00
|
|
|
#!/bin/sh
|
|
|
|
[ -f /etc/banner ] && cat /etc/banner
|
|
|
|
[ -e /tmp/.failsafe ] && cat /etc/banner.failsafe
|
|
|
|
|
|
|
|
export PATH=/usr/bin:/usr/sbin:/bin:/sbin
|
|
|
|
export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
|
|
|
|
export HOME=${HOME:-/root}
|
|
|
|
export PS1='\u@\h:\w\$ '
|
|
|
|
|
|
|
|
[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
|
|
|
|
[ -x /bin/more ] || alias more=less
|
|
|
|
[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
|
|
|
|
[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
|
|
|
|
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
|
|
|
|
|
|
|
|
HOSTNAME=$(uci get system.@system[0].hostname)
|
|
|
|
|
2018-04-09 13:08:12 +00:00
|
|
|
export PS1='\[\033[01;31m\]$HOSTNAME\[\033[01;34m\] \W #\[\033[00m\] '
|
2018-01-03 22:12:02 +00:00
|
|
|
case "$TERM" in
|
|
|
|
xterm*|rxvt*)
|
2018-04-09 13:08:12 +00:00
|
|
|
echo -ne "\033]0;${USER}@${HOSTNAME}:${PWD}\007"
|
2018-01-03 22:12:02 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|