diff options
Diffstat (limited to 'utils/ypr0tools/files/etc/profile')
-rwxr-xr-x | utils/ypr0tools/files/etc/profile | 66 |
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 @@ | |||
1 | export PS1='\u@\h \w$ ' | ||
2 | export PS2='> ' | ||
3 | export PS3='? ' | ||
4 | export PS4='[$LINENO]+' | ||
5 | |||
6 | export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin | ||
7 | export LD_LIBRARY_PATH=/mnt/media1/Lib:/mnt/media1/Lib/ExtraLib:/usr/lib | ||
8 | export FSL_OMX_COMPONENT_REGISTRY="/Sysdata/OpenMaxIL/ComponentRegistry.txt" | ||
9 | export FSL_OMX_MAX_INDEX_SIZE=1048576 | ||
10 | export MALLOC_CHECK_=0 | ||
11 | |||
12 | ulimit -s unlimited | ||
13 | hwclock -s | ||
14 | |||
15 | alias ls='ls --color=auto' | ||
16 | alias ll='ls -l --color=auto' | ||
17 | |||
18 | # Start with lorenzo92's safe mode | ||
19 | SCRIPT="/etc/mods/safe_mode.sh" | ||
20 | if [ -f $SCRIPT ] | ||
21 | then | ||
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 | ||
30 | fi | ||
31 | |||
32 | if [ -e "/mnt/media1/r0" ] | ||
33 | then | ||
34 | MAINFILE="/mnt/media1/r0" | ||
35 | elif [ -f "/mnt/media0/r0" ] | ||
36 | then | ||
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 | ||
45 | else | ||
46 | MAINFILE="/usr/local/bin/r0" | ||
47 | fi | ||
48 | |||
49 | # source the rockbox loader script | ||
50 | SOURCE="/mnt/media0/.rockbox/rockbox.sh" | ||
51 | [ -f $SOURCE ] && . $SOURCE | ||
52 | |||
53 | # source user script if available | ||
54 | SOURCE="/mnt/media0/rc.user" | ||
55 | [ -f $SOURCE ] && . $SOURCE | ||
56 | |||
57 | # finally call the entry point | ||
58 | if [ -e $MAINFILE ] | ||
59 | then | ||
60 | chmod 777 $MAINFILE | ||
61 | $MAINFILE Application AppMain | ||
62 | rm -f /mnt/media1/r0_media0 | ||
63 | sync | ||
64 | # sleep 5 | ||
65 | reboot | ||
66 | fi | ||