| #!/bin/sh |
| |
| #jb.qi add for uci check start |
| check_copy_file() { |
| if [ $# -ne 2 ];then |
| return |
| fi |
| |
| diff $1 $2 > /dev/null |
| if [ $? -ne 0 ]; then |
| echo "cp $1 $2" > /dev/kmsg |
| cp $1 $2 |
| fi |
| } |
| |
| check_uci() |
| { |
| uci get lynq_uci.lynq_ril > /dev/null |
| if [ $? -ne 0 ]; then |
| echo "$TAG: lynq_uci config cant get" > /dev/kmsg |
| cp /etc/config/lynq_uci /mnt/userdata/config/lynq_uci |
| fi |
| } |
| mkdir /mnt/userdata/config |
| check_uci |
| check_copy_file /etc/config/lynq_uci_ro /mnt/userdata/config/lynq_uci_ro |
| |
| #jb.qi add for uci check end |
| ramdump_mode=`nv get ramdump_mode` |
| |
| if [ -e /proc/sys/ramdump_ap/ramdump_start_addr ]; then |
| if [ "$ramdump_mode" == "CAPEMMC" ]; then |
| ramdump_dev=`nv get ramdump_emmc_device` |
| if [ -b $ramdump_dev ]; then |
| ramdump_start=`fdisk -l | grep $ramdump_dev | awk '{ print $4 }'` |
| ramdump_save_size=`fdisk -l | grep $ramdump_dev | awk '{ print $6 }'` |
| echo $ramdump_start > /proc/sys/ramdump_ap/ramdump_start_addr |
| echo $ramdump_save_size > /proc/sys/ramdump_ap/ramdump_emmc_size |
| else |
| echo "[zxic_ramdump]$ramdump_dev is not exist!" |
| fi |
| else |
| if [ -b $ramdump_dev ]; then |
| echo 0 > /proc/sys/ramdump_ap/ramdump_start_addr |
| fi |
| fi |
| fi |
| # 0 for usb, 1 for net |
| if [ -e /proc/sys/zcatkern/log_com_mode ]; then |
| zcat_com_mode=`nv get zcat_mode` |
| if [ "$zcat_com_mode" == "net" ]; then |
| echo 1 > /proc/sys/zcatkern/log_com_mode |
| else |
| echo 0 > /proc/sys/zcatkern/log_com_mode |
| fi |
| # sh /etc/zcatlog_monitor.sh & |
| fi |
| |