summaryrefslogtreecommitdiff
path: root/filesystem/etc/rc.d/rc.emul
diff options
context:
space:
mode:
Diffstat (limited to 'filesystem/etc/rc.d/rc.emul')
-rwxr-xr-xfilesystem/etc/rc.d/rc.emul71
1 files changed, 51 insertions, 20 deletions
diff --git a/filesystem/etc/rc.d/rc.emul b/filesystem/etc/rc.d/rc.emul
index e76c6f7..7904e2d 100755
--- a/filesystem/etc/rc.d/rc.emul
+++ b/filesystem/etc/rc.d/rc.emul
@@ -19,38 +19,69 @@ ln -sf /mnt/mmc /sdcard
ln -sf /proc/mounts /etc/mtab
echo -e "[${_G}Setting power manager state value ${C_}]"
-/usr/bin/vconftool set -t int memory/pwrmgr/state 1
+/usr/bin/vconftool set -t int memory/pm/state 1 -f
echo -e "[${_G}Initialize battery level ${C_}]"
-/usr/bin/vconftool set -t int memory/Battery/Level 5
-/usr/bin/vconftool set -t int memory/Battery/Status/Low 4
+#/usr/bin/vconftool set -t int memory/Battery/Level 5 -f
+/usr/bin/vconftool set -t int memory/sysman/battery_status_low 4 -f
-echo -e "[${_G}Mount SD card ${C_}]"
-mount -o umask=000 /dev/mmcblk0 /mnt/mmc
-chmod 777 /opt/storage/sdcard
+#echo -e "[${_G}Mount SD card ${C_}]"
+#mount -o umask=000 /dev/mmcblk0 /mnt/mmc
+#chmod 777 /opt/storage/sdcard
-MMC_MOUNT=`/bin/mount | grep mmc`
-if [ -n "$MMC_MOUNT" ]; then
- echo -e "[${_G}MMC storage detected ${C_}]"
- /usr/bin/vconftool set -t int memory/Device/Mmc 1
- /usr/bin/vconftool set -t int memory/filemanager/Mmc 2
-fi
+#MMC_MOUNT=`/bin/mount | grep mmc`
+#if [ -n "$MMC_MOUNT" ]; then
+# echo -e "[${_G}MMC storage detected ${C_}]"
+# /usr/bin/vconftool set -t memory/sysman/mmc 1 -f
+# /usr/bin/vconftool set -t int memory/filemanager/Mmc 2 -f
+#fi
+
+echo -e "[${_G}Mount host directory${C_}]"
+test -d "/mnt/host" || mkdir "/mnt/host"
+if grep "cifs=" /proc/cmdline ; then
+ cifs=`sed 's/^.*cifs=\([^, ]*\).*$/\1/g' /proc/cmdline`
+ opts=`sed 's/^.*cifs=\([^, ]*\),username=\([^, ]*\),password=\([^, ]*\).*$/username=\2,password=\3/g' /proc/cmdline`
+ cifs=`echo $cifs | tr [a-z] [A-Z]`
+ if mount -t cifs //10.0.2.2/$cifs /mnt/host -o $opts,file_mode=0777,dir_mode=0777; then
+ echo -e "[${_Y}Mount.cifs succeed${C_}]"
+ else
+ echo -e "[${_R}Mount.cifs fail!!!!${C_}]"
+ fi
+fi
+if grep "virtio-9p" /proc/cmdline ; then
+ if mount -t 9p -o trans=virtio fileshare /mnt/host -oversion=9p2000.L -o msize=65536; then
+ echo -e "[${_Y}Mount.9pfs succeed${C_}]"
+ else
+ echo -e "[${_R}Mount.9pfs fail!!!!${C_}]"
+ fi
+fi
+
+if grep -q "enable_cam" /proc/cmdline ; then
+ if grep -q "enable_cam=1" /proc/cmdline ; then
+ echo -e "[${_Y}Webcam is connected. We can use '/dev/video0' for camera.${C_}]"
+ else
+ echo -e "[${_Y}Webcam is not connected! We will remove '/dev/video0'.${C_}]"
+ rm -rf /dev/video0
+ fi
+fi
echo -e "[${_G}to generate modules.dep and map files${C_}]"
depmod -a
-echo -e "[${_G}to change brightness's group${C_}]"
-chgrp system_bklight /sys/class/backlight/emulator/brightness
-chmod g+w /sys/class/backlight/emulator/brightness
+#--move to rc3.d/S30brgihtness
+#echo -e "[${_G}to change brightness's group${C_}]"
+#chgrp system_bklight /sys/class/backlight/emulator/brightness
+#chmod g+w /sys/class/backlight/emulator/brightness
-echo -e "[${_G}to change lcd_power's group${C_}]"
-chown -R root:system_bklight /sys/devices/virtual/lcd/emulator/lcd_power
+#echo -e "[${_G}to change lcd_power's group${C_}]"
+#chown -R root:system_bklight /sys/devices/virtual/lcd/emulator/lcd_power
+#--
echo -e "[${_G}Initialize display setting value${C_}]"
-/usr/bin/vconftool set -t int db/setting/Brightness "24"
-/usr/bin/vconftool set -t int db/MainLCD/Backlight/Normal "600"
+#/usr/bin/vconftool set -t int db/setting/Brightness "24" -f
+/usr/bin/vconftool set -t int db/sysman/lcd_backlight_normal "600" -f
echo -e "[${_G}For menu_screen booting..${C_}]"
-/usr/bin/vconftool set -t int memory/startapps/sequence 1
+/usr/bin/vconftool set -t int memory/startapps/sequence 1 -f
echo -e "[${_G}rc.emul : script end ${C_}]"