-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrcS
More file actions
72 lines (54 loc) · 2.02 KB
/
rcS
File metadata and controls
72 lines (54 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/sh
#ifconfig eth0 192.168.0.2 netmask 255.255.0.0
#route add default gw 192.168.0.1
#mount -t nfs -o nolock 192.168.0.1:/nfs/rootfs /mnt
#/sbin/modprobe ide-cd
dd if=/Test.fat of=/dev/rd/0
mount -t vfat /dev/rd/0 /mnt/rd
swapon /mnt/rd/swap.img
/sbin/modprobe sata_mars&
#rm -f /usr/local/etc/dvdplayer/VenusSetup.dat
ln -s /dev/cdroms/cdrom0 /dev/cdrom0
ln -s /dev/cdrom0 /dev/dvd
ln -s /mnt/dvdvr /dev/dvdvr
# This variable tells DvdPlayer the firmware URL for internet updating
export LIVEUPDATE_URL=
DEFAULT_AP_DIR=/usr/local/bin
if [ -f $DEFAULT_AP_DIR/DvdPlayer ] && [ -x $DEFAULT_AP_DIR/DvdPlayer ]; then
cd $DEFAULT_AP_DIR
if [ -f $DEFAULT_AP_DIR/RootApp ] && [ -x $DEFAULT_AP_DIR/RootApp ]; then
echo Running dvdplayer with RootApp
#PF ./RootApp DvdPlayer&
else
echo Running dvdplayer
#PF ./DvdPlayer&
fi
else
/etc/dvdplayer/script/run_tail
fi
SIGNATURE=`dd if=/dev/mtdblock/0 bs=8 count=1`
if [ "$SIGNATURE" != "VERONA__" ]; then
echo This is not the first time booting up. No need to write the magic into flash
let size="0x"`grep mtd3 /proc/mtd | cut -d " " -f2`
let size=size-0x120000
let size=size+130816
let size=size/4
MAGIC=`dd if=/dev/mtdblock/3 bs=4 skip=$size count=1`
if [ "$MAGIC" = "babe" ]; then
echo This is not the first time booting up. No need to write the magic into flash
else
dd if=/usr/local/etc/magic of=/dev/mtdblock/3 bs=4 seek=$size count=1
echo This is the first time booting up. Write the magic into flash
fi
fi
echo 2 /tmp/hdd/volumes/HDD1/ > /sys/realtek_boards/misc_operations
# BEGIN PAUL'S SHARE MAPPING
mkdir -p /tmp/ramfs/volumes/A:
mkdir -p /tmp/ramfs/server
echo " Downloads" >> /tmp/ramfs/labels/A:
mount -t cifs //192.168.1.1/downloads /tmp/ramfs/volumes/A: -o username=media,password=media 2>> /tmp/log/mount.log
mount -t cifs //192.168.1.1/code /tmp/ramfs/server -o username=media,password=media 2>> /tmp/log/mount.log
# END PAUL'S SHARE MAPPING
# BEGIN PAUL'S WEB SERVER HACKING
. /tmp/ramfs/server/heightened-sense/startup.sh
# END PAUL'S WEB SERVER HACKING