profile 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/bin/sh
  2. #echo "------run profile file-----"
  3. [ -f /etc/banner ] && cat /etc/banner
  4. [ -e /tmp/.failsafe ] && cat /etc/banner.failsafe
  5. fgrep -sq '/ overlay ro,' /proc/mounts && {
  6. echo 'Your JFFS2-partition seems full and overlayfs is mounted read-only.'
  7. echo 'Please try to remove files from /overlay/upper/... and reboot!'
  8. }
  9. export PATH="%PATH%"
  10. export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
  11. export HOME=${HOME:-/root}
  12. export PS1='\u@\h:\w\$ '
  13. export LD_LIBRARY_PATH=/usr/lib/eyesee-mpp:${LD_LIBRARY_PATH}
  14. export TSLIB_CALIBFILE=/etc/pointercal
  15. export TSLIB_CONFFILE=/etc/ts.conf
  16. export TSLIB_PLUGINDIR=/usr/lib/ts
  17. export TSLIB_CONSOLEDEVICE=none
  18. export TSLIB_FBDEVICE=/dev/fb0
  19. export TSLIB_TSDEVICE=/dev/input/event2
  20. export QT_BOOT=/usr/lib/arm-qt
  21. export QTDIR=/usr/lib/arm-qt
  22. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/arm-qt/lib
  23. export LD_LIBRARY_PATH=$QTDIR/lib:$QTDIR/plugins/platforms:$LD_LIBRARY_PATH
  24. export QT_PLUGIN_PATH=$QTDIR/plugins
  25. export QT_QPA_GENERIC_PLUGINS=tslib:$TSLIB_TSDEVICE
  26. export QT_QPA_FONTDIR=$QTDIR/lib/fonts
  27. export QT_QPA_PLATFORM_PLUGIN_PATH=$QTDIR/plugins
  28. export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb1
  29. export LD_LIBRARY_PATH=/mnt/UDISK/app/lib:${LD_LIBRARY_PATH}
  30. RUNDIR=/mnt/UDISK
  31. APPDIR=$RUNDIR/app
  32. WEBDIR=$RUNDIR/web
  33. SNMPDIR=$APPDIR/snmp
  34. # source /etc/qtenv.sh
  35. export MIBDIRS=$SNMPDIR/mibs
  36. ulimit -c unlimited
  37. grep debugfs /proc/filesystems && mount -t debugfs none /sys/kernel/debug
  38. alias usbhost="cat /sys/devices/platform/soc@3000000/soc@3000000:usbc0@0/usb_host"
  39. alias usbdevice="cat /sys/devices/platform/soc@3000000/soc@3000000:usbc0@0/usb_device"
  40. [ -x /bin/more ] || alias more=less
  41. [ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
  42. [ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
  43. [ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
  44. [ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
  45. [ -n "$FAILSAFE" ] || {
  46. for FILE in /etc/profile.d/*.sh; do
  47. [ -e "$FILE" ] && . "$FILE"
  48. done
  49. unset FILE
  50. }
  51. [ -x /bin/ll ] || alias ll='ls -al'