mirror of https://github.com/OpenIPC/firmware.git
34 lines
1011 B
Bash
34 lines
1011 B
Bash
export PATH="/bin:/sbin:/usr/bin:/usr/sbin"
|
|
export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
|
|
export HOME=${HOME:-/root}
|
|
export TZ=$(cat /etc/TZ)
|
|
|
|
if [ "$PS1" ]; then
|
|
[ -f /etc/openipc_banner ] && echo -e "\n\e[1;36m$(cat /etc/openipc_banner)\e[0m\n"
|
|
[ -f /etc/openipc_donators ] && echo -e "\n\e[1;36m$(cat /etc/openipc_donators)\e[0m\n\n"
|
|
#
|
|
if [ "`id -u`" -eq 0 ]; then
|
|
export PS1='\u@\h:\w\# '
|
|
else
|
|
export PS1='\u@\h:\w\$ '
|
|
fi
|
|
fi
|
|
|
|
export EDITOR='/bin/vi'
|
|
|
|
|
|
[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
|
|
|
|
show_modules() { echo; cat /proc/modules | cut -f 1 -d " " | while read module; do echo "Module: $module"; \
|
|
if [ -d "/sys/module/$module/parameters" ]; then ls /sys/module/$module/parameters/ | while read parameter; \
|
|
do echo -n "Parameter: $parameter --> "; cat /sys/module/$module/parameters/$parameter; done; fi; echo; done; }
|
|
|
|
|
|
# Source configuration files from /etc/profile.d
|
|
for i in /etc/profile.d/*.sh ; do
|
|
if [ -r "$i" ]; then
|
|
. $i
|
|
fi
|
|
done
|
|
unset i
|