summaryrefslogtreecommitdiff
path: root/utils/ypr0tools/files/etc/profile
diff options
context:
space:
mode:
Diffstat (limited to 'utils/ypr0tools/files/etc/profile')
-rwxr-xr-xutils/ypr0tools/files/etc/profile66
1 files changed, 66 insertions, 0 deletions
diff --git a/utils/ypr0tools/files/etc/profile b/utils/ypr0tools/files/etc/profile
new file mode 100755
index 0000000000..4ba61d7535
--- /dev/null
+++ b/utils/ypr0tools/files/etc/profile
@@ -0,0 +1,66 @@
1export PS1='\u@\h \w$ '
2export PS2='> '
3export PS3='? '
4export PS4='[$LINENO]+'
5
6export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
7export LD_LIBRARY_PATH=/mnt/media1/Lib:/mnt/media1/Lib/ExtraLib:/usr/lib
8export FSL_OMX_COMPONENT_REGISTRY="/Sysdata/OpenMaxIL/ComponentRegistry.txt"
9export FSL_OMX_MAX_INDEX_SIZE=1048576
10export MALLOC_CHECK_=0
11
12ulimit -s unlimited
13hwclock -s
14
15alias ls='ls --color=auto'
16alias ll='ls -l --color=auto'
17
18# Start with lorenzo92's safe mode
19SCRIPT="/etc/mods/safe_mode.sh"
20if [ -f $SCRIPT ]
21then
22 /bin/sh $SCRIPT
23 # it returns 1 if usb was connected
24 if [ "$?" = "1" ]
25 then
26 sync
27 sleep 1
28 reboot
29 fi
30fi
31
32if [ -e "/mnt/media1/r0" ]
33then
34 MAINFILE="/mnt/media1/r0"
35elif [ -f "/mnt/media0/r0" ]
36then
37 # copy to media1 since USB wouldn't work
38 cp /mnt/media0/r0 /mnt/media1/r0_media0
39 if [ "$?" = "0" ]
40 then # perhaps cp failed due to insufficient storage or so
41 MAINFILE="/mnt/media1/r0_media0"
42 else
43 MAINFILE="/usr/local/bin/r0"
44 fi
45else
46 MAINFILE="/usr/local/bin/r0"
47fi
48
49# source the rockbox loader script
50SOURCE="/mnt/media0/.rockbox/rockbox.sh"
51[ -f $SOURCE ] && . $SOURCE
52
53# source user script if available
54SOURCE="/mnt/media0/rc.user"
55[ -f $SOURCE ] && . $SOURCE
56
57# finally call the entry point
58if [ -e $MAINFILE ]
59then
60 chmod 777 $MAINFILE
61 $MAINFILE Application AppMain
62 rm -f /mnt/media1/r0_media0
63 sync
64# sleep 5
65 reboot
66fi