Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2024
410
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.65 KB | None | 0 0
  1. [root@ipc:init]# df
  2. Filesystem 1K-blocks Used Available Use% Mounted on
  3. /dev/root 4352 4352 0 100% /
  4. devtmpfs 13772 0 13772 0% /dev
  5. tmpfs 13772 0 13772 0% /dev
  6. tmpfs 13772 4 13768 0% /tmp
  7. tmpfs 13772 0 13772 0% /run
  8. /dev/mtdblock6 768 84 684 11% /mnt/config
  9. [root@ipc:init]# mount | grep "^/"
  10. /dev/root on / type squashfs (ro,relatime)
  11. /dev/mtdblock6 on /mnt/config type jffs2 (rw,relatime)
  12.  
  13. ## TUYA CRAP ##
  14.  
  15. ##################
  16. ###########app_init.sh
  17. ##################
  18. #!/bin/sh
  19.  
  20. if [ -d "/mnt/config/record" ];then
  21. echo "exist record folder"
  22. else
  23. mkdir /mnt/config/record
  24. fi
  25.  
  26. if [ -b "/dev/mmcblk0p1" ];then
  27. mount /dev/mmcblk0p1 /mnt/config/record/
  28. elif [ -b "/dev/mmcblk0" ];then
  29. mount /dev/mmcblk0 /mnt/config/record/
  30. else
  31. rm /mnt/config/record/* -rf
  32. echo "can't find sdcard"
  33. fi
  34.  
  35. echo 0 0 0 0 > /proc/sys/kernel/printk
  36.  
  37. upgrade_on_sdcard.sh
  38. start_tuya_ipc.sh &
  39.  
  40.  
  41. ##################
  42. ###########start_tuya_ipc.sh
  43. #################
  44. #!/bin/sh
  45.  
  46. cp /usr/ipcam/bak/jiake_version.txt /mnt/config/
  47.  
  48. if [ ! -d "/mnt/config/record" ];then
  49. mkdir -p /mnt/config/record
  50. fi
  51.  
  52. if [ -e "/mnt/config/oem_pid.txt" ];then
  53. echo "oem_pid.txt is exist"
  54. else
  55. cp /usr/ipcam/bak/oem_pid.txt /mnt/config/
  56. fi
  57.  
  58. if [ -e "/mnt/config/tuya_config.txt" ];then
  59. echo "tuya_config.txt is exist"
  60. else
  61. cp /usr/ipcam/bak/tuya_config.txt /mnt/config/
  62. fi
  63.  
  64. if [ -e "/mnt/config/ucheck_mac.txt" ];then
  65. echo "ucheck_mac.txt is exist"
  66. else
  67. cp /usr/ipcam/bak/ucheck_mac.txt /mnt/config/
  68. fi
  69.  
  70. if [ ! -e "/mnt/config/basic_config.ini" ];then
  71. cp /usr/ipcam/bak/basic_config.ini /mnt/config/
  72. fi
  73.  
  74. if [ ! -e "/mnt/config/dev_config.ini" ];then
  75. cp /usr/ipcam/bak/dev_config.ini /mnt/config/
  76. fi
  77.  
  78. if [ ! -d "/mnt/config/dp_file_flag" ];then
  79. touch /mnt/config/no_network
  80.  
  81. mkdir -p /mnt/config/dp_file_flag/
  82. touch /mnt/config/dp_file_flag/md_low_sensitivity_file
  83. touch /mnt/config/dp_file_flag/on_osd_file
  84. touch /mnt/config/dp_file_flag/on_light_led_file
  85. fi
  86.  
  87. # create wifi error info folder
  88. mkdir -p /tmp/wifi_error_info/
  89.  
  90. if [ -e "/mnt/config/tmp_test.sh" ];then
  91. chmod 777 /mnt/config/tmp_test.sh
  92. /mnt/config/tmp_test.sh
  93. fi
  94.  
  95. # upgrade firmware #
  96. http_auto_upgrade.sh
  97.  
  98. product_wifi_scan.sh
  99. if [ $? = 1 ];then
  100. echo "start main procedure"
  101. get_mcu_version
  102. feed_watchdog_daemon.sh &
  103. tuya_daemon.sh &
  104. video_stream_detect.sh &
  105. else
  106. echo "product test now"
  107. fi
  108.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement