mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-22 21:47:19 +00:00
update init scripts
This commit is contained in:
parent
dd9e226e16
commit
eac0ce955b
@ -10,7 +10,7 @@ if [ -d /opt/wz_mini/tmp/log_gather ] ; then
|
|||||||
rm -rf /opt/wz_mini/tmp/log_gather
|
rm -rf /opt/wz_mini/tmp/log_gather
|
||||||
create_dir
|
create_dir
|
||||||
else
|
else
|
||||||
create_dir
|
create_dir
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "copy wz_mini logs"
|
echo "copy wz_mini logs"
|
||||||
@ -64,8 +64,8 @@ if [ -f /tmp/sd_check_result.txt ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$RTSP_PASSWORD" == "" ]]; then
|
if [[ "$RTSP_PASSWORD" == "" ]]; then
|
||||||
echo "password is blank in config"
|
echo "password is blank in config"
|
||||||
RTSP_PASSWORD=$(cat /opt/wz_mini/tmp/wlan0_mac)
|
RTSP_PASSWORD=$(cat /opt/wz_mini/tmp/wlan0_mac)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd /opt/wz_mini/tmp/log_gather
|
cd /opt/wz_mini/tmp/log_gather
|
||||||
|
@ -1,24 +1,41 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Bind mount system files.
|
||||||
|
# Description: Replace specific system files with our customized versions via bind mount
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
echo "Replace stock busybox"
|
case "$1" in
|
||||||
mount --bind /opt/wz_mini/bin/busybox /bin/busybox
|
start)
|
||||||
|
|
||||||
echo "Replace stock fstab"
|
echo "#####$(basename "$0")#####"
|
||||||
mount --bind /opt/wz_mini/etc/fstab /etc/fstab
|
|
||||||
|
|
||||||
echo "Replace stock inittab"
|
echo "Replace stock busybox"
|
||||||
mount --bind /opt/wz_mini/etc/inittab /etc/inittab
|
mount --bind /opt/wz_mini/bin/busybox /bin/busybox
|
||||||
|
|
||||||
echo "Bind /etc/profile for local/ssh shells"
|
echo "Replace stock fstab"
|
||||||
mount --bind /opt/wz_mini/etc/profile /etc/profile
|
mount --bind /opt/wz_mini/etc/fstab /etc/fstab
|
||||||
|
|
||||||
if [ -d /lib/modules ]; then
|
echo "Replace stock inittab"
|
||||||
echo "Mount kernel modules in /lib"
|
mount --bind /opt/wz_mini/etc/inittab /etc/inittab
|
||||||
mount --bind /opt/wz_mini/lib/modules /lib/modules
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Replace hostname"
|
echo "Replace /etc/profile for local/ssh shells"
|
||||||
echo $CUSTOM_HOSTNAME > /opt/wz_mini/etc/hostname
|
mount --bind /opt/wz_mini/etc/profile /etc/profile
|
||||||
mount --bind /opt/wz_mini/etc/hostname /etc/hostname
|
|
||||||
|
if [ -d /lib/modules ]; then
|
||||||
|
echo "Mount kernel modules in /lib"
|
||||||
|
mount --bind /opt/wz_mini/lib/modules /lib/modules
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Replace system hostname"
|
||||||
|
|
||||||
|
echo $CUSTOM_HOSTNAME > /opt/wz_mini/etc/hostname
|
||||||
|
mount --bind /opt/wz_mini/etc/hostname /etc/hostname
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
@ -1,12 +1,30 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Mount tmpfs
|
||||||
|
# Description: Mount tmpfs for system and wz_mini
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/wz_mini.conf
|
./opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
echo "Mount wz_mini tmpfs"
|
case "$1" in
|
||||||
mount -t tmpfs /opt/wz_mini/tmp
|
start)
|
||||||
|
|
||||||
echo "Create workspace directory"
|
echo "#####$(basename "$0")#####"
|
||||||
mkdir /opt/wz_mini/tmp/.storage
|
|
||||||
|
echo "Mount wz_mini tmpfs"
|
||||||
|
mount -t tmpfs /opt/wz_mini/tmp
|
||||||
|
|
||||||
|
echo "Create workspace directory"
|
||||||
|
mkdir /opt/wz_mini/tmp/.storage
|
||||||
|
|
||||||
|
echo "Mounting global tmpfs"
|
||||||
|
mount -t tmpfs /tmp
|
||||||
|
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
echo "Mounting global tmpfs"
|
|
||||||
mount -t tmpfs /tmp
|
|
||||||
|
@ -1,5 +1,23 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Setup BusyBox
|
||||||
|
# Description: Install BusyBox applets to wz_mini $PATH
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
|
||||||
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
|
echo "Install busybox applets"
|
||||||
|
mkdir /opt/wz_mini/tmp/.bin
|
||||||
|
/opt/wz_mini/bin/busybox --install -s /opt/wz_mini/tmp/.bin
|
||||||
|
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
echo "Install busybox applets"
|
|
||||||
mkdir /opt/wz_mini/tmp/.bin
|
|
||||||
/opt/wz_mini/bin/busybox --install -s /opt/wz_mini/tmp/.bin
|
|
||||||
|
@ -1,33 +1,55 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Detect device model
|
||||||
|
# Description: Detect which model device we are, and configure the system accordingly
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
##DETECT CAMERA MODEL & PLATFORM TYPE
|
|
||||||
#V2=WYZEC1-JZ
|
|
||||||
#PANv1=WYZECP1_JEF
|
|
||||||
#PANv2=HL_PAN2
|
|
||||||
#V3=WYZE_CAKP2JFUS
|
|
||||||
#DB3=WYZEDB3
|
|
||||||
#V3C=ATOM_CamV3C
|
|
||||||
|
|
||||||
#mtdblock9 only exists on the T20 platform, indicating V2 or PANv1
|
case "$1" in
|
||||||
if [ -b /dev/mtdblock9 ]; then
|
start)
|
||||||
mkdir /opt/wz_mini/tmp/params
|
|
||||||
mount -t jffs2 /dev/mtdblock9 /opt/wz_mini/tmp/params
|
echo "#####$(basename "$0")#####"
|
||||||
touch /opt/wz_mini/tmp/.$(cat /opt/wz_mini/tmp/params/config/.product_config | grep PRODUCT_MODEL | sed -e 's#.*=\(\)#\1#')
|
|
||||||
touch /opt/wz_mini/tmp/.T20
|
##DETECT CAMERA MODEL & PLATFORM TYPE
|
||||||
umount /opt/wz_mini/tmp/params
|
#V2=WYZEC1-JZ
|
||||||
rm -rf /opt/wz_mini/tmp/params
|
#PANv1=WYZECP1_JEF
|
||||||
elif [ -b /dev/mtdblock6 ]; then
|
#PANv2=HL_PAN2
|
||||||
mkdir /opt/wz_mini/tmp/configs
|
#V3=WYZE_CAKP2JFUS
|
||||||
mount -t jffs2 /dev/mtdblock6 /opt/wz_mini/tmp/configs
|
#DB3=WYZEDB3
|
||||||
touch /opt/wz_mini/tmp/.$(cat /opt/wz_mini/tmp/configs/.product_config | grep PRODUCT_MODEL | sed -e 's#.*=\(\)#\1#')
|
#V3C=ATOM_CamV3C
|
||||||
touch /opt/wz_mini/tmp/.T31
|
|
||||||
umount /opt/wz_mini/tmp/configs
|
#mtdblock9 only exists on the T20 platform, indicating V2 or PANv1
|
||||||
rm -rf /opt/wz_mini/tmp/configs
|
if [ -b /dev/mtdblock9 ]; then
|
||||||
fi
|
mkdir /opt/wz_mini/tmp/params
|
||||||
|
mount -t jffs2 /dev/mtdblock9 /opt/wz_mini/tmp/params
|
||||||
|
touch /opt/wz_mini/tmp/.$(cat /opt/wz_mini/tmp/params/config/.product_config | grep PRODUCT_MODEL | sed -e 's#.*=\(\)#\1#')
|
||||||
|
touch /opt/wz_mini/tmp/.T20
|
||||||
|
echo "$(cat /opt/wz_mini/tmp/params/config/.product_config | grep PRODUCT_MODEL | sed -e 's#.*=\(\)#\1#') detected"
|
||||||
|
umount /opt/wz_mini/tmp/params
|
||||||
|
rm -rf /opt/wz_mini/tmp/params
|
||||||
|
elif [ -b /dev/mtdblock6 ]; then
|
||||||
|
mkdir /opt/wz_mini/tmp/configs
|
||||||
|
mount -t jffs2 /dev/mtdblock6 /opt/wz_mini/tmp/configs
|
||||||
|
touch /opt/wz_mini/tmp/.$(cat /opt/wz_mini/tmp/configs/.product_config | grep PRODUCT_MODEL | sed -e 's#.*=\(\)#\1#')
|
||||||
|
touch /opt/wz_mini/tmp/.T31
|
||||||
|
echo "$(cat /opt/wz_mini/tmp/configs/.product_config | grep PRODUCT_MODEL | sed -e 's#.*=\(\)#\1#') detected"
|
||||||
|
umount /opt/wz_mini/tmp/configs
|
||||||
|
rm -rf /opt/wz_mini/tmp/configs
|
||||||
|
fi
|
||||||
|
|
||||||
|
#Check for Car FW
|
||||||
|
if [ -f /opt/wz_mini/tmp/.WYZEC1-JZ ]; then
|
||||||
|
if cat /system/bin/app.ver | grep 4.55; then
|
||||||
|
touch /opt/wz_mini/tmp/.CAR
|
||||||
|
echo "Car FW detected!"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
#Check for Car FW
|
|
||||||
if [ -f /opt/wz_mini/tmp/.WYZEC1-JZ ]; then
|
|
||||||
if cat /system/bin/app.ver | grep 4.55; then
|
|
||||||
touch /opt/wz_mini/tmp/.CAR
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
@ -1,7 +1,28 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
### BEGIN INIT INFO
|
||||||
mount -t jffs2 /dev/mtdblock4 /system
|
# Provides:
|
||||||
elif [ -f /opt/wz_mini/tmp/.T31 ]; then
|
# Short-Description: Mount /system
|
||||||
mount /dev/mtdblock3 /system
|
# Description: Mount /system for manipulation, before app_init.sh does
|
||||||
fi
|
### END INIT INFO
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
|
||||||
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
|
echo "mounting /system"
|
||||||
|
mount -t jffs2 /dev/mtdblock4 /system
|
||||||
|
elif [ -f /opt/wz_mini/tmp/.T31 ]; then
|
||||||
|
echo "mounting /system"
|
||||||
|
mount /dev/mtdblock3 /system
|
||||||
|
fi
|
||||||
|
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@ -1,52 +1,69 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Inject commands into app_init.sh
|
||||||
|
# Description: Patch app_init.sh to inject wz_mini's init.d scripts
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
echo "Copy stock rcS"
|
case "$1" in
|
||||||
cp /etc/init.d/rcS /opt/wz_mini/tmp/.storage/rcS
|
start)
|
||||||
|
|
||||||
echo "Add verbose debugging to rcS"
|
echo "#####$(basename "$0")#####"
|
||||||
sed -i '/^".*/aset -x' /opt/wz_mini/tmp/.storage/rcS
|
|
||||||
|
|
||||||
echo "Inject init.d scripts to rcS"
|
echo "Copy stock rcS"
|
||||||
sed -i '/^# Run init script.*/i/opt/wz_mini/etc/rc.d/K01network \&\n' /opt/wz_mini/tmp/.storage/rcS
|
cp /etc/init.d/rcS /opt/wz_mini/tmp/.storage/rcS
|
||||||
sed -i '/^# Run init script.*/i/opt/wz_mini/etc/rc.d/K03rcd\n' /opt/wz_mini/tmp/.storage/rcS
|
|
||||||
|
|
||||||
echo "Modify Global Paths in rcS"
|
echo "Add verbose debugging to rcS"
|
||||||
sed -i '/sbin:/s/$/:\/opt\/wz_mini\/bin/' /opt/wz_mini/tmp/.storage/rcS
|
sed -i '/^".*/aset -x' /opt/wz_mini/tmp/.storage/rcS
|
||||||
sed -i '/system\/\lib/s/$/:\/opt\/wz_mini\/lib/' /opt/wz_mini/tmp/.storage/rcS
|
|
||||||
|
|
||||||
#Custom PATH hooks
|
echo "Inject init.d scripts to rcS"
|
||||||
#sed -i '/^# Run init script.*/i#Hook Library PATH here\nexport LD_LIBRARY_PATH=/tmp/test/lib:$LD_LIBRARY_PATH\n' /opt/wz_mini/tmp/.storage/rcS
|
sed -i '/^# Run init script.*/i/opt/wz_mini/etc/rc.d/K01network \&\n' /opt/wz_mini/tmp/.storage/rcS
|
||||||
#sed -i '/^# Run init script.*/i#Hook system PATH here\nexport PATH=/tmp/test/bin:$PATH\n' /opt/wz_mini/tmp/.storage/rcS
|
sed -i '/^# Run init script.*/i/opt/wz_mini/etc/rc.d/K03rcd\n' /opt/wz_mini/tmp/.storage/rcS
|
||||||
|
|
||||||
echo "Copy factory app_init.sh"
|
echo "Modify Global Paths in rcS"
|
||||||
cp /system/init/app_init.sh /opt/wz_mini/tmp/.storage/app_init.sh
|
sed -i '/sbin:/s/$/:\/opt\/wz_mini\/bin/' /opt/wz_mini/tmp/.storage/rcS
|
||||||
|
sed -i '/system\/\lib/s/$/:\/opt\/wz_mini\/lib/' /opt/wz_mini/tmp/.storage/rcS
|
||||||
|
|
||||||
echo "Replace factory app_init.sh path"
|
#Custom PATH hooks
|
||||||
sed -i '/\/system\/init\/app_init.sh/,+4d' /opt/wz_mini/tmp/.storage/rcS
|
#sed -i '/^# Run init script.*/i#Hook Library PATH here\nexport LD_LIBRARY_PATH=/tmp/test/lib:$LD_LIBRARY_PATH\n' /opt/wz_mini/tmp/.storage/rcS
|
||||||
sed -i '/Run init script.*/a /opt/wz_mini/tmp/.storage/app_init.sh \&\n' /opt/wz_mini/tmp/.storage/rcS
|
#sed -i '/^# Run init script.*/i#Hook system PATH here\nexport PATH=/tmp/test/bin:$PATH\n' /opt/wz_mini/tmp/.storage/rcS
|
||||||
sed -i '/\/system\/init\/app_init.sh/,+2d' /opt/wz_mini/tmp/.storage/rcS
|
echo "Copy factory app_init.sh"
|
||||||
|
cp /system/init/app_init.sh /opt/wz_mini/tmp/.storage/app_init.sh
|
||||||
|
|
||||||
if [[ "$DEBUG_ENABLED" == "true" ]]; then
|
echo "Replace factory app_init.sh path"
|
||||||
sed -i '/app_init.sh/,+4d' /opt/wz_mini/tmp/.storage/rcS
|
sed -i '/\/system\/init\/app_init.sh/,+4d' /opt/wz_mini/tmp/.storage/rcS
|
||||||
sed -i '/^# Run init/i/bin/sh /etc/profile' /opt/wz_mini/tmp/.storage/rcS
|
sed -i '/Run init script.*/a /opt/wz_mini/tmp/.storage/app_init.sh \&\n' /opt/wz_mini/tmp/.storage/rcS
|
||||||
touch /tmp/dbgflag
|
sed -i '/\/system\/init\/app_init.sh/,+2d' /opt/wz_mini/tmp/.storage/rcS
|
||||||
|
|
||||||
elif [[ "$WEB_CAM_ENABLE" == "true" ]]; then
|
if [[ "$DEBUG_ENABLED" == "true" ]]; then
|
||||||
sed -i '/app_init.sh/,+4d' /opt/wz_mini/tmp/.storage/rcS
|
sed -i '/app_init.sh/,+4d' /opt/wz_mini/tmp/.storage/rcS
|
||||||
sed -i '/^# Run init/i/opt/wz_mini/etc/rc.d/K02webcam &' /opt/wz_mini/tmp/.storage/rcS
|
sed -i '/^# Run init/i/bin/sh /etc/profile' /opt/wz_mini/tmp/.storage/rcS
|
||||||
touch /tmp/dbgflag
|
touch /tmp/dbgflag
|
||||||
|
|
||||||
elif [[ -d /opt/Upgrade ]]; then
|
elif [[ "$WEB_CAM_ENABLE" == "true" ]]; then
|
||||||
sed -i '/app_init.sh/,+4d' /opt/wz_mini/tmp/.storage/rcS
|
sed -i '/app_init.sh/,+4d' /opt/wz_mini/tmp/.storage/rcS
|
||||||
sed -i '/^# Run init/i/bin/sh /etc/profile' /opt/wz_mini/tmp/.storage/rcS
|
sed -i '/^# Run init/i/opt/wz_mini/etc/rc.d/K02webcam &' /opt/wz_mini/tmp/.storage/rcS
|
||||||
sed -i '/^# Mount configs.*/i/opt/wz_mini/bin/upgrade-run.sh &\n' /opt/wz_mini/tmp/.storage/rcS
|
touch /tmp/dbgflag
|
||||||
touch /tmp/dbgflag
|
|
||||||
fi
|
elif [[ -d /opt/Upgrade ]]; then
|
||||||
|
sed -i '/app_init.sh/,+4d' /opt/wz_mini/tmp/.storage/rcS
|
||||||
|
sed -i '/^# Run init/i/bin/sh /etc/profile' /opt/wz_mini/tmp/.storage/rcS
|
||||||
|
sed -i '/^# Mount configs.*/i/opt/wz_mini/bin/upgrade-run.sh &\n' /opt/wz_mini/tmp/.storage/rcS
|
||||||
|
touch /tmp/dbgflag
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Enable libcallback"
|
||||||
|
if [[ "$LIBCALLBACK_ENABLE" == "true" ]] || ([[ "$RTSP_HI_RES_ENABLED" == "true" ]] || [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]); then
|
||||||
|
echo "set path for iCamera"
|
||||||
|
sed -i 's/\/system\/bin\/iCamera/\/opt\/wz_mini\/usr\/bin\/iCamera/g' /opt/wz_mini/tmp/.storage/app_init.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
echo "Enable libcallback"
|
|
||||||
if [[ "$LIBCALLBACK_ENABLE" == "true" ]] || ([[ "$RTSP_HI_RES_ENABLED" == "true" ]] || [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]); then
|
|
||||||
echo "set path for iCamera"
|
|
||||||
sed -i 's/\/system\/bin\/iCamera/\/opt\/wz_mini\/usr\/bin\/iCamera/g' /opt/wz_mini/tmp/.storage/app_init.sh
|
|
||||||
fi
|
|
||||||
|
@ -1,15 +1,30 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Change system password
|
||||||
|
# Description: Replace system password with wz_mini's version
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
echo "Replace stock password"
|
case "$1" in
|
||||||
cp /opt/wz_mini/etc/shadow /opt/wz_mini/tmp/.storage/shadow
|
start)
|
||||||
|
|
||||||
if [[ "$DEBUG_PASSWORD" == "true" ]]; then
|
echo "#####$(basename "$0")#####"
|
||||||
sed -i 's/:[^:]*/:/' /opt/wz_mini/tmp/.storage/shadow
|
|
||||||
echo "Remove stock password"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mount --bind /opt/wz_mini/tmp/.storage/shadow /etc/shadow
|
echo "Replace stock password"
|
||||||
chmod 400 /etc/shadow
|
cp /opt/wz_mini/etc/shadow /opt/wz_mini/tmp/.storage/shadow
|
||||||
|
|
||||||
|
if [[ "$DEBUG_PASSWORD" == "true" ]]; then
|
||||||
|
sed -i 's/:[^:]*/:/' /opt/wz_mini/tmp/.storage/shadow
|
||||||
|
echo "Remove stock password"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mount --bind /opt/wz_mini/tmp/.storage/shadow /etc/shadow
|
||||||
|
chmod 400 /etc/shadow
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
@ -1,27 +1,40 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Check for first boot of wz_mini
|
||||||
|
# Description: Check to see if this is the first time wz_mini is booting, if it is, play an audio prompt
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/etc/rc.common
|
. /opt/wz_mini/wz_mini.conf
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/etc/rc.common
|
||||||
|
|
||||||
if [ -e /opt/wz_mini/etc/.first_boot ]; then
|
|
||||||
echo "First boot already completed"
|
|
||||||
else
|
|
||||||
echo "First boot, initializing"
|
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
|
||||||
#May need different gpio for PANv1
|
|
||||||
#We don't rmmod this module, as it is marked [permanent] by the kernel on T20
|
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14/extra/audio.ko sign_mode=0
|
|
||||||
LD_LIBRARY_PATH='/opt/wz_mini/lib' /opt/wz_mini/bin/audioplay_t20 /opt/wz_mini/usr/share/audio/init_v2.wav $AUDIO_PROMPT_VOLUME
|
|
||||||
else
|
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/audio.ko spk_gpio=$GPIO alc_mode=0 mic_gain=0
|
|
||||||
/opt/wz_mini/bin/audioplay_t31 /opt/wz_mini/usr/share/audio/init.wav $AUDIO_PROMPT_VOLUME
|
|
||||||
rmmod audio
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f /opt/wz_mini/etc/.first_boot ]; then
|
case "$1" in
|
||||||
echo "Not first_boot"
|
start)
|
||||||
else
|
|
||||||
echo "Set first_boot"
|
echo "#####$(basename "$0")#####"
|
||||||
touch /opt/wz_mini/etc/.first_boot
|
|
||||||
fi
|
if [ -e /opt/wz_mini/etc/.first_boot ]; then
|
||||||
|
echo "First boot already completed"
|
||||||
|
else
|
||||||
|
echo "First boot, initializing"
|
||||||
|
touch /opt/wz_mini/etc/.first_boot
|
||||||
|
|
||||||
|
#May need different gpio for PANv1
|
||||||
|
#We don't rmmod this module, as it is marked [permanent] by the kernel on T20
|
||||||
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
|
insmod /opt/wz_mini/lib/modules/3.10.14/extra/audio.ko sign_mode=0
|
||||||
|
LD_LIBRARY_PATH='/opt/wz_mini/lib' /opt/wz_mini/bin/audioplay_t20 /opt/wz_mini/usr/share/audio/init_v2.wav $AUDIO_PROMPT_VOLUME
|
||||||
|
else
|
||||||
|
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/audio.ko spk_gpio=$GPIO alc_mode=0 mic_gain=0
|
||||||
|
/opt/wz_mini/bin/audioplay_t31 /opt/wz_mini/usr/share/audio/init.wav $AUDIO_PROMPT_VOLUME
|
||||||
|
rmmod audio
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@ -1,144 +1,160 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Load kernel modules
|
||||||
|
# Description: Load kernel modules depending on model and configuration
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/etc/rc.common
|
. /opt/wz_mini/wz_mini.conf
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/etc/rc.common
|
||||||
|
|
||||||
if [[ "$ENABLE_RTL8189FS_DRIVER" == "true" ]] || [[ "$ENABLE_RTL8189FS_DRIVER" == "" ]]; then
|
case "$1" in
|
||||||
echo "Enable 8189fs"
|
start)
|
||||||
if [ -f /opt/wz_mini/tmp/.WYZEC1-JZ ]; then
|
|
||||||
sed -i 's/\/driver\/rtl8189ftv.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\/extra\/8189fs.ko rtw_power_mgnt=0 rtw_enusbss=0 rtw_drv_log_level=0/g' /opt/wz_mini/tmp/.storage/app_init.sh
|
|
||||||
elif [ -f /opt/wz_mini/tmp/.WYZECP1_JEF ]; then
|
|
||||||
sed -i 's/insmod \/driver\/8189es.ko/insmod \/opt\/wz_mini\/lib\/modules\/3.10.14\/extra\/8189es.ko rtw_power_mgnt=0 rtw_enusbss=0 rtw_drv_log_level=0/g' /opt/wz_mini/tmp/.storage/app_init.sh
|
|
||||||
elif [ -f /opt/wz_mini/tmp/.WYZE_CAKP2JFUS ]; then
|
|
||||||
sed -i 's/\/system\/driver\/rtl8189ftv.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\_\_isvp_swan_1.0\_\_\/extra\/8189fs.ko rtw_power_mgnt=0 rtw_enusbss=0 rtw_drv_log_level=0/g' /opt/wz_mini/tmp/.storage/app_init.sh
|
|
||||||
elif [ -f /opt/wz_mini/tmp/.ATOM_CamV3C ]; then
|
|
||||||
sed -i 's/\/system\/driver\/rtl8189ftv.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\_\_isvp_swan_1.0\_\_\/extra\/8189fs.ko rtw_power_mgnt=0 rtw_enusbss=0 rtw_drv_log_level=0/g' /opt/wz_mini/tmp/.storage/app_init.sh
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$ENABLE_ATBM603X_DRIVER" == "true" ]] || [[ "$ENABLE_ATBM603X_DRIVER" == "" ]]; then
|
echo "#####$(basename "$0")#####"
|
||||||
echo "Enable atbm603x_wifi_sdio"
|
|
||||||
if [ -f /opt/wz_mini/tmp/.ATOM_CamV3C ]; then
|
|
||||||
sed -i 's/\/thirdlib\/atbm603x_wifi_sdio.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\_\_isvp_swan_1.0\_\_\/extra\/atbm603x_wifi_sdio.ko atbm_printk_mask=0/g' /opt/wz_mini/tmp/.storage/app_init.sh
|
|
||||||
elif [ -f /opt/wz_mini/tmp/.T31 ] && ! [ -f /opt/wz_mini/tmp/.ATOM_CamV3C ]; then
|
|
||||||
sed -i 's/\/system\/driver\/atbm603x_wifi_sdio.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\_\_isvp_swan_1.0\_\_\/extra\/atbm603x_wifi_sdio.ko atbm_printk_mask=0/g' /opt/wz_mini/tmp/.storage/app_init.sh
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f /opt/wz_mini/tmp/.CAR ] || [[ "$ENABLE_CAR_DRIVER" == "true" ]]; then
|
if [[ "$ENABLE_RTL8189FS_DRIVER" == "true" ]] || [[ "$ENABLE_RTL8189FS_DRIVER" == "" ]]; then
|
||||||
echo "Enable cp210x serial driver for car"
|
echo "Enable 8189fs"
|
||||||
modprobe cp210x
|
if [ -f /opt/wz_mini/tmp/.WYZEC1-JZ ]; then
|
||||||
fi
|
sed -i 's/\/driver\/rtl8189ftv.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\/extra\/8189fs.ko rtw_power_mgnt=0 rtw_enusbss=0 rtw_drv_log_level=0/g' /opt/wz_mini/tmp/.storage/app_init.sh
|
||||||
|
elif [ -f /opt/wz_mini/tmp/.WYZECP1_JEF ]; then
|
||||||
#RTSP SERVER
|
sed -i 's/insmod \/driver\/8189es.ko/insmod \/opt\/wz_mini\/lib\/modules\/3.10.14\/extra\/8189es.ko rtw_power_mgnt=0 rtw_enusbss=0 rtw_drv_log_level=0/g' /opt/wz_mini/tmp/.storage/app_init.sh
|
||||||
if ([[ "$RTSP_HI_RES_ENABLED" == "true" ]] || [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]) && ! [[ -e /tmp/dbgflag ]]; then
|
elif [ -f /opt/wz_mini/tmp/.WYZE_CAKP2JFUS ]; then
|
||||||
if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]] && [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
sed -i 's/\/system\/driver\/rtl8189ftv.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\_\_isvp_swan_1.0\_\_\/extra\/8189fs.ko rtw_power_mgnt=0 rtw_enusbss=0 rtw_drv_log_level=0/g' /opt/wz_mini/tmp/.storage/app_init.sh
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
elif [ -f /opt/wz_mini/tmp/.ATOM_CamV3C ]; then
|
||||||
echo "Load video loopback driver at video6 video7"
|
sed -i 's/\/system\/driver\/rtl8189ftv.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\_\_isvp_swan_1.0\_\_\/extra\/8189fs.ko rtw_power_mgnt=0 rtw_enusbss=0 rtw_drv_log_level=0/g' /opt/wz_mini/tmp/.storage/app_init.sh
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14/extra/v4l2loopback_V2.ko video_nr=6,7
|
fi
|
||||||
else
|
|
||||||
echo "Load video loopback driver at video1 video2"
|
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/v4l2loopback.ko video_nr=1,2
|
|
||||||
fi
|
fi
|
||||||
elif [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
if [[ "$ENABLE_ATBM603X_DRIVER" == "true" ]] || [[ "$ENABLE_ATBM603X_DRIVER" == "" ]]; then
|
||||||
echo "Load video loopback driver at video7"
|
echo "Enable atbm603x_wifi_sdio"
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14/extra/v4l2loopback_V2.ko video_nr=7
|
if [ -f /opt/wz_mini/tmp/.ATOM_CamV3C ]; then
|
||||||
else
|
sed -i 's/\/thirdlib\/atbm603x_wifi_sdio.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\_\_isvp_swan_1.0\_\_\/extra\/atbm603x_wifi_sdio.ko atbm_printk_mask=0/g' /opt/wz_mini/tmp/.storage/app_init.sh
|
||||||
echo "Load video loopback driver at video2"
|
elif [ -f /opt/wz_mini/tmp/.T31 ] && ! [ -f /opt/wz_mini/tmp/.ATOM_CamV3C ]; then
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/v4l2loopback.ko video_nr=2
|
sed -i 's/\/system\/driver\/atbm603x_wifi_sdio.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\_\_isvp_swan_1.0\_\_\/extra\/atbm603x_wifi_sdio.ko atbm_printk_mask=0/g' /opt/wz_mini/tmp/.storage/app_init.sh
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
elif [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
if [ -f /opt/wz_mini/tmp/.CAR ] || [[ "$ENABLE_CAR_DRIVER" == "true" ]]; then
|
||||||
echo "Load video loopback driver at video6"
|
echo "Enable cp210x serial driver for car"
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14/extra/v4l2loopback_V2.ko video_nr=6
|
modprobe cp210x
|
||||||
else
|
fi
|
||||||
echo "Load video loopback driver at video1"
|
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/v4l2loopback.ko video_nr=1
|
if ([[ "$RTSP_HI_RES_ENABLED" == "true" ]] || [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]) && ! [[ -e /tmp/dbgflag ]]; then
|
||||||
|
if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]] && [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
||||||
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
|
echo "Load video loopback driver at video6 video7"
|
||||||
|
insmod /opt/wz_mini/lib/modules/3.10.14/extra/v4l2loopback_V2.ko video_nr=6,7
|
||||||
|
else
|
||||||
|
echo "Load video loopback driver at video1 video2"
|
||||||
|
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/v4l2loopback.ko video_nr=1,2
|
||||||
|
fi
|
||||||
|
elif [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
||||||
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
|
echo "Load video loopback driver at video7"
|
||||||
|
insmod /opt/wz_mini/lib/modules/3.10.14/extra/v4l2loopback_V2.ko video_nr=7
|
||||||
|
else
|
||||||
|
echo "Load video loopback driver at video2"
|
||||||
|
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/v4l2loopback.ko video_nr=2
|
||||||
|
fi
|
||||||
|
elif [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
||||||
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
|
echo "Load video loopback driver at video6"
|
||||||
|
insmod /opt/wz_mini/lib/modules/3.10.14/extra/v4l2loopback_V2.ko video_nr=6
|
||||||
|
else
|
||||||
|
echo "Load video loopback driver at video1"
|
||||||
|
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/v4l2loopback.ko video_nr=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if [[ "$ENABLE_NFSv4" == "true" ]]; then
|
if [[ "$ENABLE_NFSv4" == "true" ]]; then
|
||||||
insmod $KMOD_PATH/kernel/lib/oid_registry.ko
|
insmod $KMOD_PATH/kernel/lib/oid_registry.ko
|
||||||
insmod $KMOD_PATH/kernel/net/dns_resolver/dns_resolver.ko
|
insmod $KMOD_PATH/kernel/net/dns_resolver/dns_resolver.ko
|
||||||
insmod $KMOD_PATH/kernel/fs/nfs/nfsv4.ko
|
insmod $KMOD_PATH/kernel/fs/nfs/nfsv4.ko
|
||||||
insmod $KMOD_PATH/kernel/net/sunrpc/auth_gss/auth_rpcgss.ko
|
insmod $KMOD_PATH/kernel/net/sunrpc/auth_gss/auth_rpcgss.ko
|
||||||
echo "NFSv4 enabled"
|
echo "NFSv4 enabled"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$ENABLE_IPTABLES" == "true" ]]; then
|
if [[ "$ENABLE_IPTABLES" == "true" ]]; then
|
||||||
|
|
||||||
insmod $KMOD_PATH/kernel/net/netfilter/x_tables.ko
|
insmod $KMOD_PATH/kernel/net/netfilter/x_tables.ko
|
||||||
insmod $KMOD_PATH/kernel/net/ipv4/netfilter/ip_tables.ko
|
insmod $KMOD_PATH/kernel/net/ipv4/netfilter/ip_tables.ko
|
||||||
insmod $KMOD_PATH/kernel/net/ipv4/netfilter/ipt_REJECT.ko
|
insmod $KMOD_PATH/kernel/net/ipv4/netfilter/ipt_REJECT.ko
|
||||||
insmod $KMOD_PATH/kernel/net/ipv4/netfilter/iptable_filter.ko
|
insmod $KMOD_PATH/kernel/net/ipv4/netfilter/iptable_filter.ko
|
||||||
insmod $KMOD_PATH/kernel/net/ipv4/netfilter/iptable_mangle.ko
|
insmod $KMOD_PATH/kernel/net/ipv4/netfilter/iptable_mangle.ko
|
||||||
echo "iptables IPv4 enabled"
|
echo "iptables IPv4 enabled"
|
||||||
|
|
||||||
if [[ "$ENABLE_IPV6" == "true" ]]; then
|
if [[ "$ENABLE_IPV6" == "true" ]]; then
|
||||||
insmod $KMOD_PATH/kernel/net/ipv6/netfilter/ip6_tables.ko
|
insmod $KMOD_PATH/kernel/net/ipv6/netfilter/ip6_tables.ko
|
||||||
insmod $KMOD_PATH/kernel/net/ipv6/netfilter/ip6t_REJECT.ko
|
insmod $KMOD_PATH/kernel/net/ipv6/netfilter/ip6t_REJECT.ko
|
||||||
insmod $KMOD_PATH/kernel/net/ipv6/netfilter/ip6table_filter.ko
|
insmod $KMOD_PATH/kernel/net/ipv6/netfilter/ip6table_filter.ko
|
||||||
insmod $KMOD_PATH/kernel/net/ipv6/netfilter/ip6table_mangle.ko
|
insmod $KMOD_PATH/kernel/net/ipv6/netfilter/ip6table_mangle.ko
|
||||||
echo "iptables IPv6 enabled"
|
echo "iptables IPv6 enabled"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$ENABLE_WIREGUARD" == "true" ]]; then
|
if [[ "$ENABLE_WIREGUARD" == "true" ]]; then
|
||||||
insmod $KMOD_PATH/kernel/net/ipv4/tunnel4.ko
|
insmod $KMOD_PATH/kernel/net/ipv4/tunnel4.ko
|
||||||
insmod $KMOD_PATH/kernel/net/ipv4/ip_tunnel.ko
|
insmod $KMOD_PATH/kernel/net/ipv4/ip_tunnel.ko
|
||||||
insmod $KMOD_PATH/kernel/net/wireguard/wireguard.ko
|
insmod $KMOD_PATH/kernel/net/wireguard/wireguard.ko
|
||||||
echo "Wireguard enabled"
|
echo "Wireguard enabled"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$ENABLE_CIFS" == "true" ]]; then
|
if [[ "$ENABLE_CIFS" == "true" ]]; then
|
||||||
insmod $KMOD_PATH/kernel/fs/cifs/cifs.ko
|
insmod $KMOD_PATH/kernel/fs/cifs/cifs.ko
|
||||||
echo "CIFS enabled"
|
echo "CIFS enabled"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$ENABLE_USB_STORAGE" == "true" ]]; then
|
if [[ "$ENABLE_USB_STORAGE" == "true" ]]; then
|
||||||
insmod $KMOD_PATH/kernel/drivers/scsi/scsi_mod.ko
|
insmod $KMOD_PATH/kernel/drivers/scsi/scsi_mod.ko
|
||||||
insmod $KMOD_PATH/kernel/drivers/scsi/sd_mod.ko
|
insmod $KMOD_PATH/kernel/drivers/scsi/sd_mod.ko
|
||||||
insmod $KMOD_PATH/kernel/drivers/usb/storage/usb-storage.ko
|
insmod $KMOD_PATH/kernel/drivers/usb/storage/usb-storage.ko
|
||||||
echo "usb_storage enabled"
|
echo "usb_storage enabled"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$ENABLE_EXT4" == "true" ]]; then
|
if [[ "$ENABLE_EXT4" == "true" ]]; then
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
insmod $KMOD_PATH/kernel/lib/crc16.ko
|
insmod $KMOD_PATH/kernel/lib/crc16.ko
|
||||||
fi
|
fi
|
||||||
|
|
||||||
insmod $KMOD_PATH/kernel/fs/jbd2/jbd2.ko
|
insmod $KMOD_PATH/kernel/fs/jbd2/jbd2.ko
|
||||||
insmod $KMOD_PATH/kernel/fs/mbcache.ko
|
insmod $KMOD_PATH/kernel/fs/mbcache.ko
|
||||||
insmod $KMOD_PATH/kernel/fs/ext4/ext4.ko
|
insmod $KMOD_PATH/kernel/fs/ext4/ext4.ko
|
||||||
echo "ext4 support enabled"
|
echo "ext4 support enabled"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$BONDING_ENABLED" == "true" ]]; then
|
if [[ "$BONDING_ENABLED" == "true" ]]; then
|
||||||
if [[ "$BONDING_LINK_MONITORING_FREQ_MS" == "" ]]; then
|
if [[ "$BONDING_LINK_MONITORING_FREQ_MS" == "" ]]; then
|
||||||
BONDING_LINK_MONITORING_FREQ_MS="100"
|
BONDING_LINK_MONITORING_FREQ_MS="100"
|
||||||
fi
|
fi
|
||||||
if [[ "$BONDING_DOWN_DELAY_MS" == "" ]]; then
|
if [[ "$BONDING_DOWN_DELAY_MS" == "" ]]; then
|
||||||
BONDING_DOWN_DELAY_MS="5000"
|
BONDING_DOWN_DELAY_MS="5000"
|
||||||
fi
|
fi
|
||||||
if [[ "$BONDING_UP_DELAY_MS" == "" ]]; then
|
if [[ "$BONDING_UP_DELAY_MS" == "" ]]; then
|
||||||
BONDING_UP_DELAY_MS="5000"
|
BONDING_UP_DELAY_MS="5000"
|
||||||
fi
|
fi
|
||||||
if [[ "$BONDING_PRIMARY_INTERFACE" == "" ]]; then
|
if [[ "$BONDING_PRIMARY_INTERFACE" == "" ]]; then
|
||||||
BONDING_PRIMARY_INTERFACE="eth0"
|
BONDING_PRIMARY_INTERFACE="eth0"
|
||||||
fi
|
fi
|
||||||
if [[ "$BONDING_SECONDARY_INTERFACE" == "" ]]; then
|
if [[ "$BONDING_SECONDARY_INTERFACE" == "" ]]; then
|
||||||
BONDING_SECONDARY_INTERFACE="wlan0"
|
BONDING_SECONDARY_INTERFACE="wlan0"
|
||||||
fi
|
fi
|
||||||
if [[ "$BONDING_FAIL_OVER_MAC" == "" ]]; then
|
if [[ "$BONDING_FAIL_OVER_MAC" == "" ]]; then
|
||||||
BONDING_FAIL_OVER_MAC="0"
|
BONDING_FAIL_OVER_MAC="0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Insert the bonding driver into the kernel
|
echo "Insert the bonding driver into the kernel"
|
||||||
insmod $KMOD_PATH/kernel/drivers/net/bonding/bonding.ko mode=active-backup miimon="$BONDING_LINK_MONITORING_FREQ_MS" downdelay="$BONDING_DOWN_DELAY_MS" updelay="$BONDING_UP_DELAY_MS" primary="$BONDING_PRIMARY_INTERFACE" fail_over_mac="$BONDING_FAIL_OVER_MAC"
|
insmod $KMOD_PATH/kernel/drivers/net/bonding/bonding.ko mode=active-backup miimon="$BONDING_LINK_MONITORING_FREQ_MS" downdelay="$BONDING_DOWN_DELAY_MS" updelay="$BONDING_UP_DELAY_MS" primary="$BONDING_PRIMARY_INTERFACE" fail_over_mac="$BONDING_FAIL_OVER_MAC"
|
||||||
|
|
||||||
|
echo "Network bonding enabled"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
echo "Network bonding enabled"
|
|
||||||
fi
|
|
||||||
|
@ -1,35 +1,52 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Backup critical device files
|
||||||
|
# Description: Backup /configs and /params directory, these files are unique to the device, and if lost the camera is unusable.
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
#CAMERA CONFIGURATION FILES BACKUP
|
. /opt/wz_mini/wz_mini.conf
|
||||||
if [ -d /opt/.wz_backup ]; then
|
|
||||||
echo "Factory config backup directory missing"
|
|
||||||
else
|
|
||||||
echo "Creating factory config backup directory"
|
|
||||||
mkdir /opt/.wz_backup
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f /opt/wz_mini/tmp/.T31 ]; then
|
case "$1" in
|
||||||
echo "T31 platform backup"
|
start)
|
||||||
if [ -d /opt/.wz_backup/configs ]; then
|
|
||||||
echo "Factory configs backup directory present, not backing up again"
|
|
||||||
else
|
|
||||||
echo "Backup /configs"
|
|
||||||
cp -R /configs/ /opt/.wz_backup/
|
|
||||||
fi
|
|
||||||
elif [ -f /opt/wz_mini/tmp/.T20 ]; then
|
|
||||||
echo "T20 platform backup"
|
|
||||||
if [ -d /opt/.wz_backup/configs ]; then
|
|
||||||
echo "Factory configs backup directory present, not backing up again"
|
|
||||||
else
|
|
||||||
echo "Backup /configs"
|
|
||||||
cp -R /configs/ /opt/.wz_backup/
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d /opt/.wz_backup/params ]; then
|
echo "#####$(basename "$0")#####"
|
||||||
echo "Factory params backup directory present, not backing up again"
|
|
||||||
else
|
if [ -d /opt/.wz_backup ]; then
|
||||||
echo "Backup /params"
|
echo "Factory config backup directory missing"
|
||||||
cp -R /params/ /opt/.wz_backup/
|
else
|
||||||
fi
|
echo "Creating factory config backup directory"
|
||||||
fi
|
mkdir /opt/.wz_backup
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /opt/wz_mini/tmp/.T31 ]; then
|
||||||
|
echo "T31 platform backup"
|
||||||
|
if [ -d /opt/.wz_backup/configs ]; then
|
||||||
|
echo "Factory configs backup directory present, not backing up again"
|
||||||
|
else
|
||||||
|
echo "Backup /configs"
|
||||||
|
cp -R /configs/ /opt/.wz_backup/
|
||||||
|
fi
|
||||||
|
elif [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
|
echo "T20 platform backup"
|
||||||
|
if [ -d /opt/.wz_backup/configs ]; then
|
||||||
|
echo "Factory configs backup directory present, not backing up again"
|
||||||
|
else
|
||||||
|
echo "Backup /configs"
|
||||||
|
cp -R /configs/ /opt/.wz_backup/
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d /opt/.wz_backup/params ]; then
|
||||||
|
echo "Factory params backup directory present, not backing up again"
|
||||||
|
else
|
||||||
|
echo "Backup /params"
|
||||||
|
cp -R /params/ /opt/.wz_backup/
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@ -1,5 +1,23 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Start ssh daemon
|
||||||
|
# Description: Run the dropbear ssh daemon
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
echo "Run dropbear ssh server"
|
. /opt/wz_mini/wz_mini.conf
|
||||||
/opt/wz_mini/bin/dropbear -R -s -g
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
|
||||||
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
|
echo "Running dropbear ssh server"
|
||||||
|
/opt/wz_mini/bin/dropbear -R -s -g
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@ -1,8 +1,27 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Check for terminfo directory
|
||||||
|
# Description: Provide the proper terminfo files for nano and shells
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
|
||||||
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
|
if [ -d /opt/wz_mini/usr/share/terminfo ]; then
|
||||||
|
echo "Terminfo already present"
|
||||||
|
else
|
||||||
|
echo "Terminfo not present, extract"
|
||||||
|
tar xf /opt/wz_mini/usr/share/terminfo.tar -C /opt/wz_mini/usr/share/
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [ -d /opt/wz_mini/usr/share/terminfo ]; then
|
|
||||||
echo "Terminfo already present"
|
|
||||||
else
|
|
||||||
echo "Terminfo not present, extract"
|
|
||||||
tar xf /opt/wz_mini/usr/share/terminfo.tar -C /opt/wz_mini/usr/share/
|
|
||||||
fi
|
|
||||||
|
@ -1,7 +1,26 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Disable factorycheck
|
||||||
|
# Description: On T31 devices, we must disable factory check to prevent it from unmounting our binds.
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
|
||||||
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
|
if [ -f /opt/wz_mini/tmp/.T31 ]; then
|
||||||
|
mount --bind /opt/wz_mini/bin/factorycheck /system/bin/factorycheck
|
||||||
|
touch /tmp/usrflag
|
||||||
|
echo "Replace factorycheck with dummy, to prevent bind unmount"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [ -f /opt/wz_mini/tmp/.T31 ]; then
|
|
||||||
mount --bind /opt/wz_mini/bin/factorycheck /system/bin/factorycheck
|
|
||||||
touch /tmp/usrflag
|
|
||||||
echo "Replace factorycheck with dummy, to prevent bind unmount"
|
|
||||||
fi
|
|
||||||
|
@ -1,14 +1,25 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: WLAN HW Init check
|
||||||
|
# Description: Make sure the WLAN hardware is functional and initialized before proceeding.
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
#Wait for wlan hardware to be intitialized in app_init.sh, this must be blocking.
|
. /opt/wz_mini/etc/rc.common
|
||||||
|
|
||||||
while true; do
|
case "$1" in
|
||||||
if ifconfig wlan0 | grep "HWaddr"; then
|
start)
|
||||||
echo "wlan0 hwaddr is up"
|
echo "#####$(basename "$0")#####"
|
||||||
break
|
|
||||||
else
|
#Wait for wlan hardware to be intitialized in app_init.sh, this must be blocking.
|
||||||
echo "wlan0 hwaddr not ready yet..."
|
#Lets come up with a solution for some cameras with failed wlan hw, someone on reddit mentioned it"
|
||||||
sleep 5
|
echo "Waiting for wlan hw init"
|
||||||
fi
|
|
||||||
done
|
wait_for_wlan $(basename "$0")
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@ -1,8 +1,25 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Enable/Disable IPv6
|
||||||
|
# Description: Enable/Disable IPv6 based on the user configuration
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
|
||||||
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
|
if ! [[ "$ENABLE_IPV6" == "true" ]]; then
|
||||||
|
sysctl -w net.ipv6.conf.all.disable_ipv6=1
|
||||||
|
echo "ipv6 disabled"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if ! [[ "$ENABLE_IPV6" == "true" ]]; then
|
|
||||||
sysctl -w net.ipv6.conf.all.disable_ipv6=1
|
|
||||||
echo "ipv6 disabled"
|
|
||||||
fi
|
|
||||||
|
@ -1,32 +1,50 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Wireguard support
|
||||||
|
# Description: Enable Wireguard support
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/etc/rc.common
|
. /opt/wz_mini/wz_mini.conf
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/etc/rc.common
|
||||||
|
|
||||||
if [[ "$ENABLE_WIREGUARD" == "true" ]]; then
|
case "$1" in
|
||||||
|
start)
|
||||||
|
|
||||||
if [[ "$WIREGUARD_IPV4" != "" ]]; then
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
if [ -d /opt/wz_mini/etc/wireguard ]; then
|
if [[ "$ENABLE_WIREGUARD" == "true" ]]; then
|
||||||
echo "Wireguard dir exists"
|
|
||||||
|
if [[ "$WIREGUARD_IPV4" != "" ]]; then
|
||||||
|
|
||||||
|
if [ -d /opt/wz_mini/etc/wireguard ]; then
|
||||||
|
echo "Wireguard dir exists"
|
||||||
|
else
|
||||||
|
mkdir -p /opt/wz_mini/etc/wireguard
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f /opt/wz_mini/etc/wireguard/privatekey ]; then
|
||||||
|
(umask 277 && /opt/wz_mini/bin/wg genkey | /opt/wz_mini/bin/busybox tee /opt/wz_mini/etc/wireguard/privatekey | /opt/wz_mini/bin/wg pubkey > /opt/wz_mini/etc/wireguard/publickey)
|
||||||
|
fi
|
||||||
|
|
||||||
|
/opt/wz_mini/bin/busybox ip link add dev wg0 type wireguard
|
||||||
|
/opt/wz_mini/bin/busybox ip address add dev wg0 "$WIREGUARD_IPV4"
|
||||||
|
/opt/wz_mini/bin/wg set wg0 private-key /opt/wz_mini/etc/wireguard/privatekey
|
||||||
|
/opt/wz_mini/bin/busybox ip link set wg0 up
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$WIREGUARD_PEER_PUBLIC_KEY" != "" ]] && [[ "$WIREGUARD_PEER_ALLOWED_IPS" != "" ]] && [[ "$WIREGUARD_PEER_ENDPOINT" != "" ]] && [[ "$WIREGUARD_PEER_KEEP_ALIVE" != "" ]]; then
|
||||||
|
/opt/wz_mini/bin/wg set wg0 peer "$WIREGUARD_PEER_PUBLIC_KEY" allowed-ips "$WIREGUARD_PEER_ALLOWED_IPS" endpoint "$WIREGUARD_PEER_ENDPOINT" persistent-keepalive "$WIREGUARD_PEER_KEEP_ALIVE"
|
||||||
|
/opt/wz_mini/bin/busybox ip route add "$WIREGUARD_PEER_ALLOWED_IPS" dev wg0
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
mkdir -p /opt/wz_mini/etc/wireguard
|
echo "Wireguard disabled"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f /opt/wz_mini/etc/wireguard/privatekey ]; then
|
;;
|
||||||
(umask 277 && /opt/wz_mini/bin/wg genkey | /opt/wz_mini/bin/busybox tee /opt/wz_mini/etc/wireguard/privatekey | /opt/wz_mini/bin/wg pubkey > /opt/wz_mini/etc/wireguard/publickey)
|
*)
|
||||||
fi
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
/opt/wz_mini/bin/busybox ip link add dev wg0 type wireguard
|
|
||||||
/opt/wz_mini/bin/busybox ip address add dev wg0 "$WIREGUARD_IPV4"
|
|
||||||
/opt/wz_mini/bin/wg set wg0 private-key /opt/wz_mini/etc/wireguard/privatekey
|
|
||||||
/opt/wz_mini/bin/busybox ip link set wg0 up
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$WIREGUARD_PEER_PUBLIC_KEY" != "" ]] && [[ "$WIREGUARD_PEER_ALLOWED_IPS" != "" ]] && [[ "$WIREGUARD_PEER_ENDPOINT" != "" ]] && [[ "$WIREGUARD_PEER_KEEP_ALIVE" != "" ]]; then
|
|
||||||
/opt/wz_mini/bin/wg set wg0 peer "$WIREGUARD_PEER_PUBLIC_KEY" allowed-ips "$WIREGUARD_PEER_ALLOWED_IPS" endpoint "$WIREGUARD_PEER_ENDPOINT" persistent-keepalive "$WIREGUARD_PEER_KEEP_ALIVE"
|
|
||||||
/opt/wz_mini/bin/busybox ip route add "$WIREGUARD_PEER_ALLOWED_IPS" dev wg0
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "Wireguard disabled"
|
|
||||||
fi
|
|
||||||
|
@ -1,6 +1,25 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Set system hostname
|
||||||
|
# Description: Set system hostname
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
|
||||||
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
|
|
||||||
|
echo "Set hostname to $CUSTOM_HOSTNAME"
|
||||||
|
hostname $CUSTOM_HOSTNAME
|
||||||
|
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
echo "Set hostname to $CUSTOM_HOSTNAME"
|
|
||||||
hostname $CUSTOM_HOSTNAME
|
|
||||||
|
@ -1,11 +1,34 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Start daemon at boot time
|
||||||
|
# Description: Enable service provided by daemon.
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
if [[ "$ENABLE_LOCAL_DNS" == "true" ]]; then
|
case "$1" in
|
||||||
dnsmasq -C /opt/wz_mini/etc/dnsmasq.conf
|
start)
|
||||||
rm -f /tmp/resolv.conf
|
|
||||||
cp /opt/wz_mini/etc/resolv.conf /tmp/resolv.conf
|
echo "#####$(basename "$0")#####"
|
||||||
echo "dnsmasq enabled"
|
|
||||||
fi
|
if [[ "$ENABLE_LOCAL_DNS" == "true" ]]; then
|
||||||
|
dnsmasq -C /opt/wz_mini/etc/dnsmasq.conf
|
||||||
|
rm -f /tmp/resolv.conf
|
||||||
|
cp /opt/wz_mini/etc/resolv.conf /tmp/resolv.conf
|
||||||
|
echo "dnsmasq enabled"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
pkill dnsmasq
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
$0 stop
|
||||||
|
$0 start
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@ -1,9 +1,32 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Basic Web Server
|
||||||
|
# Description: If enabled, start the httpd web server
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
if [[ "$WEB_SERVER_ENABLED" == "true" ]]; then
|
case "$1" in
|
||||||
httpd -p 80 -h /opt/wz_mini/www
|
start)
|
||||||
echo "httpd enabled"
|
|
||||||
fi
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
|
if [[ "$WEB_SERVER_ENABLED" == "true" ]]; then
|
||||||
|
httpd -p 80 -h /opt/wz_mini/www
|
||||||
|
echo "httpd enabled"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
pkill dnsmasq
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
$0 stop
|
||||||
|
$0 start
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@ -1,18 +1,33 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Remote USB Accessory Support
|
||||||
|
# Description: If enabled, support remote usb accessories using socat
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/etc/rc.common
|
. /opt/wz_mini/etc/rc.common
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
remote() {
|
remote() {
|
||||||
|
wait_for_wlan_ip $(basename "$0")
|
||||||
|
|
||||||
wait_for_wlan_ip
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
if [[ "$REMOTE_SPOTLIGHT" == "true" ]]; then
|
if [[ "$REMOTE_SPOTLIGHT" == "true" ]]; then
|
||||||
/opt/wz_mini/bin/socat pty,link=/dev/ttyUSB0,raw tcp:"$REMOTE_SPOTLIGHT_HOST":9000 &
|
/opt/wz_mini/bin/socat pty,link=/dev/ttyUSB0,raw tcp:"$REMOTE_SPOTLIGHT_HOST":9000 &
|
||||||
echo "Remote accessory support enabled"
|
echo "Remote accessory support enabled"
|
||||||
else
|
else
|
||||||
echo "Remote accessory support disabled"
|
echo "Remote accessory support disabled"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
remote &
|
case "$1" in
|
||||||
|
start)
|
||||||
|
remote &
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@ -1,9 +1,29 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
source /opt/wz_mini/etc/rc.common
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Store WLAN HW Address
|
||||||
|
# Description: Store the WLAN HW Address for use by other scripts
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
wait_for_wlan_wpa
|
. /opt/wz_mini/etc/rc.common
|
||||||
|
|
||||||
cat /sys/class/net/wlan0/address | tr '[:lower:]' '[:upper:]' > /opt/wz_mini/tmp/wlan0_mac
|
storemac() {
|
||||||
echo "store original mac"
|
wait_for_wlan_wpa $(basename "$0")
|
||||||
|
|
||||||
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
|
cat /sys/class/net/wlan0/address | tr '[:lower:]' '[:upper:]' > /opt/wz_mini/tmp/wlan0_mac
|
||||||
|
echo "store original mac"
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
storemac
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@ -1,84 +1,129 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
source /opt/wz_mini/wz_mini.conf
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Start RTSP Server
|
||||||
|
# Description: Provide RTSP Streaming Video over IP
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
|
||||||
HI_VIDEO_DEV="/dev/video6"
|
|
||||||
else
|
|
||||||
HI_VIDEO_DEV="/dev/video1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$RTSP_PASSWORD" = "" ]]; then
|
|
||||||
RTSP_PASSWORD=$(cat /opt/wz_mini/tmp/wlan0_mac)
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Enable video ch 0"
|
|
||||||
/opt/wz_mini/bin/cmd video 0 on
|
|
||||||
|
|
||||||
if [[ "$RTSP_HI_RES_ENABLE_AUDIO" == "true" ]]; then
|
|
||||||
echo "Enable audio ch 0"
|
|
||||||
/opt/wz_mini/bin/cmd audio 0 on
|
|
||||||
AUDIO_CH="-C 1"
|
|
||||||
AUDIO_FMT="-a S16_LE"
|
|
||||||
DEVICE1="$HI_VIDEO_DEV,hw:0,0"
|
|
||||||
else
|
|
||||||
DEVICE1="$HI_VIDEO_DEV"
|
|
||||||
echo "rtsp audio disabled"
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
|
||||||
echo "rtsp disabled"
|
|
||||||
|
|
||||||
|
RTSP=/opt/wz_mini/log/v4l2rtspserver
|
||||||
|
if [[ -e $RTSP.log || -L $RTSP.log ]] ; then
|
||||||
|
i=0
|
||||||
|
while [[ -e $RTSP.log.$i || -L $RTSP.log.$i ]] ; do
|
||||||
|
let i++
|
||||||
|
done
|
||||||
|
mv $RTSP.log $RTSP.log.$i
|
||||||
|
RTSP=$RTSP
|
||||||
fi
|
fi
|
||||||
|
touch -- "$RTSP".log
|
||||||
|
|
||||||
|
|
||||||
if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
case "$1" in
|
||||||
|
start)
|
||||||
|
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
echo "#####$(basename "$0")#####"
|
||||||
LOW_VIDEO_DEV="/dev/video7"
|
|
||||||
else
|
|
||||||
LOW_VIDEO_DEV="/dev/video2"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Enable video ch 1"
|
if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
||||||
/opt/wz_mini/bin/cmd video 1 on
|
|
||||||
|
|
||||||
if [[ "$RTSP_PASSWORD" = "" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
RTSP_PASSWORD=$(cat /opt/wz_mini/tmp/wlan0_mac)
|
HI_VIDEO_DEV="/dev/video6"
|
||||||
fi
|
else
|
||||||
|
HI_VIDEO_DEV="/dev/video1"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$RTSP_LOW_RES_ENABLE_AUDIO" == "true" ]]; then
|
if [[ "$RTSP_PASSWORD" = "" ]]; then
|
||||||
echo "Enable video ch 1"
|
RTSP_PASSWORD=$(cat /opt/wz_mini/tmp/wlan0_mac)
|
||||||
/opt/wz_mini/bin/cmd audio 1 on
|
fi
|
||||||
AUDIO_CH="-C 1"
|
|
||||||
AUDIO_FMT="-a S16_LE"
|
|
||||||
DEVICE2="$LOW_VIDEO_DEV,hw:2,0"
|
|
||||||
else
|
|
||||||
DEVICE2="$LOW_VIDEO_DEV"
|
|
||||||
echo "rtsp audio disabled"
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
echo "Enable video ch 0"
|
||||||
echo "rtsp disabled"
|
/opt/wz_mini/bin/cmd video 0 on > /dev/null
|
||||||
|
|
||||||
fi
|
if [[ "$RTSP_HI_RES_ENABLE_AUDIO" == "true" ]]; then
|
||||||
|
echo "Enable audio ch 0"
|
||||||
|
/opt/wz_mini/bin/cmd audio 0 on > /dev/null
|
||||||
|
AUDIO_CH="-C 1"
|
||||||
|
AUDIO_FMT="-a S16_LE"
|
||||||
|
DEVICE1="$HI_VIDEO_DEV,hw:0,0"
|
||||||
|
else
|
||||||
|
DEVICE1="$HI_VIDEO_DEV"
|
||||||
|
echo "rtsp audio disabled"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]] || [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
else
|
||||||
echo "delay RTSP for iCamera"
|
echo "rtsp disabled"
|
||||||
#This delay is required. Sometimes, if you start the rtsp server too soon, live view will break on the app.
|
|
||||||
sleep 5
|
|
||||||
|
|
||||||
if [[ "$RTSP_AUTH_DISABLE" == "true" ]]; then
|
fi
|
||||||
LD_LIBRARY_PATH=/opt/wz_mini/lib /opt/wz_mini/bin/v4l2rtspserver $AUDIO_CH $AUDIO_FMT -F0 -P "$RTSP_PORT" $DEVICE1 $DEVICE2 &
|
|
||||||
else
|
|
||||||
LD_LIBRARY_PATH=/opt/wz_mini/lib /opt/wz_mini/bin/v4l2rtspserver $AUDIO_CH $AUDIO_FMT -F0 -U "$RTSP_LOGIN":"$RTSP_PASSWORD" -P "$RTSP_PORT" $DEVICE1 $DEVICE2 &
|
|
||||||
fi
|
|
||||||
|
|
||||||
sleep 1
|
|
||||||
echo "Set imp variables via helper"
|
|
||||||
/opt/wz_mini/usr/bin/imp_helper.sh > /dev/null 2>&1 &
|
|
||||||
fi
|
|
||||||
|
|
||||||
sync;echo 3 > /proc/sys/vm/drop_caches
|
if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
||||||
|
|
||||||
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
|
LOW_VIDEO_DEV="/dev/video7"
|
||||||
|
else
|
||||||
|
LOW_VIDEO_DEV="/dev/video2"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Enable video ch 1"
|
||||||
|
/opt/wz_mini/bin/cmd video 1 on > /dev/null
|
||||||
|
|
||||||
|
if [[ "$RTSP_PASSWORD" = "" ]]; then
|
||||||
|
RTSP_PASSWORD=$(cat /opt/wz_mini/tmp/wlan0_mac)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$RTSP_LOW_RES_ENABLE_AUDIO" == "true" ]]; then
|
||||||
|
echo "Enable video ch 1"
|
||||||
|
/opt/wz_mini/bin/cmd audio 1 on > /dev/null
|
||||||
|
AUDIO_CH="-C 1"
|
||||||
|
AUDIO_FMT="-a S16_LE"
|
||||||
|
DEVICE2="$LOW_VIDEO_DEV,hw:2,0"
|
||||||
|
else
|
||||||
|
DEVICE2="$LOW_VIDEO_DEV"
|
||||||
|
echo "rtsp audio disabled"
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "rtsp disabled"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]] || [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
||||||
|
echo "delay RTSP for iCamera"
|
||||||
|
#This delay is required. Sometimes, if you start the rtsp server too soon, live view will break on the app.
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
if [[ "$RTSP_AUTH_DISABLE" == "true" ]]; then
|
||||||
|
echo "Starting RTSP server"
|
||||||
|
LD_LIBRARY_PATH=/opt/wz_mini/lib LD_PRELOAD=/system/lib/libsetunbuf.so /opt/wz_mini/bin/v4l2rtspserver $AUDIO_CH $AUDIO_FMT -F0 -P "$RTSP_PORT" $DEVICE1 $DEVICE2 > $RTSP.log 2>&1 &
|
||||||
|
else
|
||||||
|
echo "Starting RTSP server"
|
||||||
|
LD_LIBRARY_PATH=/opt/wz_mini/lib LD_PRELOAD=/system/lib/libsetunbuf.so /opt/wz_mini/bin/v4l2rtspserver $AUDIO_CH $AUDIO_FMT -F0 -U "$RTSP_LOGIN":"$RTSP_PASSWORD" -P "$RTSP_PORT" $DEVICE1 $DEVICE2 > $RTSP.log 2>&1 &
|
||||||
|
fi
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
echo "Set imp variables via helper"
|
||||||
|
/opt/wz_mini/usr/bin/imp_helper.sh > /dev/null 2>&1 &
|
||||||
|
fi
|
||||||
|
|
||||||
|
sync;echo 3 > /proc/sys/vm/drop_caches
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
pkill v4l2rtspserver
|
||||||
|
cmd video 0 off
|
||||||
|
cmd audio 0 off
|
||||||
|
cmd video 1 off
|
||||||
|
cmd audio 1 off
|
||||||
|
pkill imp_helper.sh
|
||||||
|
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
$0 stop
|
||||||
|
$0 start
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@ -1,14 +1,36 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Start rtsp service
|
||||||
|
# Description: Enable RTMP Streaming Video
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
if ([[ "$RTSP_LOW_RES_ENABLED" == "true" ]] || [[ "$RTSP_HI_RES_ENABLED" == "true" ]]) && [[ "$RTMP_STREAM_ENABLED" == "true" ]] && ([[ "$RTSP_LOW_RES_ENABLE_AUDIO" == "true" ]] || [[ "$RTSP_HI_RES_ENABLE_AUDIO" == "true" ]]); then
|
case "$1" in
|
||||||
if [[ "$RTMP_STREAM_DISABLE_AUDIO" == "true" ]]; then
|
start)
|
||||||
RTMP_AUDIO="no_audio"
|
echo "#####$(basename "$0")#####"
|
||||||
fi
|
|
||||||
echo "delay RTMP server"
|
if ([[ "$RTSP_LOW_RES_ENABLED" == "true" ]] || [[ "$RTSP_HI_RES_ENABLED" == "true" ]]) && [[ "$RTMP_STREAM_ENABLED" == "true" ]] && ([[ "$RTSP_LOW_RES_ENABLE_AUDIO" == "true" ]] || [[ "$RTSP_HI_RES_ENABLE_AUDIO" == "true" ]]); then
|
||||||
#Follow the delay from the RTSP server
|
if [[ "$RTMP_STREAM_DISABLE_AUDIO" == "true" ]]; then
|
||||||
sleep 5
|
RTMP_AUDIO="no_audio"
|
||||||
/opt/wz_mini/bin/rtmp-stream.sh "$RMTP_STREAM_SERVICE" "$RTMP_AUDIO" &
|
fi
|
||||||
fi
|
echo "delay RTMP server"
|
||||||
|
#Follow the delay from the RTSP server
|
||||||
|
sleep 5
|
||||||
|
/opt/wz_mini/bin/rtmp-stream.sh "$RMTP_STREAM_SERVICE" "$RTMP_AUDIO" &
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
pkill dnsmasq
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
$0 stop
|
||||||
|
$0 start
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@ -4,57 +4,57 @@ source /opt/wz_mini/wz_mini.conf
|
|||||||
|
|
||||||
#Set module dir depending on platform
|
#Set module dir depending on platform
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
KMOD_PATH="/opt/wz_mini/lib/modules/3.10.14"
|
KMOD_PATH="/opt/wz_mini/lib/modules/3.10.14"
|
||||||
else
|
else
|
||||||
KMOD_PATH="/opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__"
|
KMOD_PATH="/opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$ENABLE_USB_ETH" == "true" ]]; then
|
if [[ "$ENABLE_USB_ETH" == "true" ]]; then
|
||||||
ALT_IFACE=eth0
|
ALT_IFACE=eth0
|
||||||
elif [[ "$ENABLE_USB_DIRECT" == "true" ]] || [[ "$ENABLE_USB_RNDIS" == "true" ]]; then
|
elif [[ "$ENABLE_USB_DIRECT" == "true" ]] || [[ "$ENABLE_USB_RNDIS" == "true" ]]; then
|
||||||
ALT_IFACE=usb0
|
ALT_IFACE=usb0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Set the correct GPIO for the audio driver (T31 only)
|
#Set the correct GPIO for the audio driver (T31 only)
|
||||||
if [ -f /opt/wz_mini/tmp/.HL_PAN2 ]; then
|
if [ -f /opt/wz_mini/tmp/.HL_PAN2 ]; then
|
||||||
GPIO=7
|
GPIO=7
|
||||||
elif [ -f /opt/wz_mini/tmp/.WYZE_CAKP2JFUS ]; then
|
elif [ -f /opt/wz_mini/tmp/.WYZE_CAKP2JFUS ]; then
|
||||||
GPIO=63
|
GPIO=63
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wait_for_wlan() {
|
wait_for_wlan() {
|
||||||
while true; do
|
while true; do
|
||||||
if ifconfig wlan0 | grep "HWaddr"; then
|
if ifconfig wlan0 | grep "HWaddr" > /dev/null; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo "Network HW not ready yet, try again in 5 seconds"
|
echo "$1: Network HW not ready yet, try again in 5 seconds"
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
wait_for_wlan_wpa() {
|
wait_for_wlan_wpa() {
|
||||||
while true; do
|
while true; do
|
||||||
if [ -e /tmp/wpa_supplicant.conf ]; then
|
if [ -e /tmp/wpa_supplicant.conf ]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo "wpa_supplicant not initialized yet, try again in 5 seconds"
|
echo "$1: wpa_supplicant not initialized yet, try again in 5 seconds"
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
wait_for_wlan_ip() {
|
wait_for_wlan_ip() {
|
||||||
while true; do
|
while true; do
|
||||||
if ifconfig wlan0 | grep "inet addr"; then
|
if ifconfig wlan0 | grep "inet addr" > /dev/null; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo "IP Address not aquired yet, try again in 5 seconds"
|
echo "$1: IP Address not acquired yet, try again in 5 seconds"
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
wait_for_icamera() {
|
wait_for_icamera() {
|
||||||
while ! pgrep -f "/system/bin/iCamera" > /dev/null; do
|
while ! pgrep -f "/system/bin/iCamera" > /dev/null; do
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
source /opt/wz_mini/etc/rc.common
|
. /opt/wz_mini/etc/rc.common
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
if [ -e /tmp/dbgflag ]; then
|
if [ -e /tmp/dbgflag ]; then
|
||||||
echo "debug enabled, network.d disabled."
|
echo "debug enabled, network.d disabled."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wait_for_wlan
|
wait_for_wlan $(basename "$0")
|
||||||
|
|
||||||
for i in /opt/wz_mini/etc/network.d/S??* ;do
|
for i in /opt/wz_mini/etc/network.d/S??* ;do
|
||||||
|
|
||||||
@ -16,22 +16,22 @@ for i in /opt/wz_mini/etc/network.d/S??* ;do
|
|||||||
[ ! -f "$i" ] && continue
|
[ ! -f "$i" ] && continue
|
||||||
|
|
||||||
case "$i" in
|
case "$i" in
|
||||||
*.sh)
|
*.sh)
|
||||||
# Source shell script for speed.
|
# Source shell script for speed.
|
||||||
(
|
(
|
||||||
trap - INT QUIT TSTP
|
trap - INT QUIT TSTP
|
||||||
set start
|
set start
|
||||||
. $i
|
. $i
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# No sh extension, so fork subprocess.
|
# No sh extension, so fork subprocess.
|
||||||
$i start
|
$i start
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
wait_for_wlan_ip
|
wait_for_wlan_ip $(basename "$0")
|
||||||
|
|
||||||
for i in /opt/wz_mini/etc/rc.local.d/* ;do
|
for i in /opt/wz_mini/etc/rc.local.d/* ;do
|
||||||
|
|
||||||
@ -39,27 +39,27 @@ for i in /opt/wz_mini/etc/rc.local.d/* ;do
|
|||||||
[ ! -f "$i" ] && continue
|
[ ! -f "$i" ] && continue
|
||||||
|
|
||||||
case "$i" in
|
case "$i" in
|
||||||
*.sh)
|
*.sh)
|
||||||
# Source shell script for speed.
|
# Source shell script for speed.
|
||||||
(
|
(
|
||||||
trap - INT QUIT TSTP
|
trap - INT QUIT TSTP
|
||||||
set start
|
set start
|
||||||
. $i
|
. $i
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# No sh extension, so fork subprocess.
|
# No sh extension, so fork subprocess.
|
||||||
$i start
|
$i start
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
if [ -f "$CUSTOM_SCRIPT_PATH" ]; then
|
if [ -f "$CUSTOM_SCRIPT_PATH" ]; then
|
||||||
echo "Starting custom script"
|
echo "Starting custom script"
|
||||||
$CUSTOM_SCRIPT_PATH &
|
$CUSTOM_SCRIPT_PATH &
|
||||||
else
|
else
|
||||||
echo "No custom script configured in wz_mini.conf"
|
echo "No custom script configured in wz_mini.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
/opt/wz_mini/etc/rc.d/K15logging
|
/opt/wz_mini/etc/rc.d/K15logging
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
LOG_NAME=/opt/wz_mini/log/wz_cam
|
LOG_NAME=/opt/wz_mini/log/wz_cam
|
||||||
if [[ -e $LOG_NAME.log || -L $LOG_NAME.log ]] ; then
|
if [[ -e $LOG_NAME.log || -L $LOG_NAME.log ]] ; then
|
||||||
i=0
|
i=0
|
||||||
while [[ -e $LOG_NAME.log.$i || -L $LOG_NAME.log.$i ]] ; do
|
while [[ -e $LOG_NAME.log.$i || -L $LOG_NAME.log.$i ]] ; do
|
||||||
let i++
|
let i++
|
||||||
done
|
done
|
||||||
mv $LOG_NAME.log $LOG_NAME.log.$i
|
mv $LOG_NAME.log $LOG_NAME.log.$i
|
||||||
LOG_NAME=$LOG_NAME
|
LOG_NAME=$LOG_NAME
|
||||||
fi
|
fi
|
||||||
touch -- "$LOG_NAME".log
|
touch -- "$LOG_NAME".log
|
||||||
exec 1> $LOG_NAME.log 2>&1
|
exec 1> $LOG_NAME.log 2>&1
|
||||||
@ -19,16 +19,16 @@ export WZMINI_CFG=/opt/wz_mini/wz_mini.conf
|
|||||||
echo "welcome to wz_cam.sh"
|
echo "welcome to wz_cam.sh"
|
||||||
echo "PID $$"
|
echo "PID $$"
|
||||||
|
|
||||||
if [ -f /opt/wz_mini/tmp/.T31 ]; then
|
if [ -f /opt/wz_mini/tmp/.T31 ]; then
|
||||||
|
|
||||||
cp /opt/wz_mini/etc/uvc.config /opt/wz_mini/usr/bin/uvc.config
|
cp /opt/wz_mini/etc/uvc.config /opt/wz_mini/usr/bin/uvc.config
|
||||||
|
|
||||||
if [[ "WEB_CAM_FPS_RATE" != "" ]]; then
|
if [[ "WEB_CAM_FPS_RATE" != "" ]]; then
|
||||||
sed -i "s/fps_num :30/fps_num :$WEB_CAM_FPS_RATE/" "/opt/wz_mini/usr/bin/uvc.config"
|
sed -i "s/fps_num :30/fps_num :$WEB_CAM_FPS_RATE/" "/opt/wz_mini/usr/bin/uvc.config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "WEB_CAM_BIT_RATE" != "" ]]; then
|
if [[ "WEB_CAM_BIT_RATE" != "" ]]; then
|
||||||
sed -i "s/bitrate :8000/bitrate :$WEB_CAM_BIT_RATE/" "/opt/wz_mini/usr/bin/uvc.config"
|
sed -i "s/bitrate :8000/bitrate :$WEB_CAM_BIT_RATE/" "/opt/wz_mini/usr/bin/uvc.config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo 1 > /proc/sys/vm/overcommit_memory
|
echo 1 > /proc/sys/vm/overcommit_memory
|
||||||
@ -47,10 +47,10 @@ echo "PID $$"
|
|||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
#Set dwc2 ID_PIN driver memory
|
echo "Set dwc2 ID_PIN driver memory"
|
||||||
devmem 0x13500000 32 0x001100cc
|
devmem 0x13500000 32 0x001100cc
|
||||||
devmem 0x10000040 32 0x0b000096
|
devmem 0x10000040 32 0x0b000096
|
||||||
#wipe the bits to set the ID_PIN
|
echo "Wipe dwc2 memory bits to set the ID_PIN"
|
||||||
devmem 0x10000040 32 0x0b000FFF
|
devmem 0x10000040 32 0x0b000FFF
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
@ -69,11 +69,11 @@ else
|
|||||||
cp /opt/wz_mini/etc/uvc_v2.config /opt/wz_mini/usr/bin/uvc.config
|
cp /opt/wz_mini/etc/uvc_v2.config /opt/wz_mini/usr/bin/uvc.config
|
||||||
|
|
||||||
if [[ "WEB_CAM_FPS_RATE" != "" ]]; then
|
if [[ "WEB_CAM_FPS_RATE" != "" ]]; then
|
||||||
sed -i "s/fps_num :30/fps_num :$WEB_CAM_FPS_RATE/" "/opt/wz_mini/usr/bin/uvc.config"
|
sed -i "s/fps_num :30/fps_num :$WEB_CAM_FPS_RATE/" "/opt/wz_mini/usr/bin/uvc.config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "WEB_CAM_BIT_RATE" != "" ]]; then
|
if [[ "WEB_CAM_BIT_RATE" != "" ]]; then
|
||||||
sed -i "s/bitrate :8000/bitrate :$WEB_CAM_BIT_RATE/" "/opt/wz_mini/usr/bin/uvc.config"
|
sed -i "s/bitrate :8000/bitrate :$WEB_CAM_BIT_RATE/" "/opt/wz_mini/usr/bin/uvc.config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mount --bind /opt/wz_mini/usr/bin /system/bin
|
mount --bind /opt/wz_mini/usr/bin /system/bin
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ -e /tmp/dbgflag ]; then
|
if [ -e /tmp/dbgflag ]; then
|
||||||
echo "debug enabled, rc.d disabled."
|
echo "debug enabled, rc.d disabled."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for i in /opt/wz_mini/etc/rc.d/S??* ;do
|
for i in /opt/wz_mini/etc/rc.d/S??* ;do
|
||||||
@ -11,17 +11,17 @@ for i in /opt/wz_mini/etc/rc.d/S??* ;do
|
|||||||
[ ! -f "$i" ] && continue
|
[ ! -f "$i" ] && continue
|
||||||
|
|
||||||
case "$i" in
|
case "$i" in
|
||||||
*.sh)
|
*.sh)
|
||||||
# Source shell script for speed.
|
# Source shell script for speed.
|
||||||
(
|
(
|
||||||
trap - INT QUIT TSTP
|
trap - INT QUIT TSTP
|
||||||
set start
|
set start
|
||||||
. $i
|
. $i
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# No sh extension, so fork subprocess.
|
# No sh extension, so fork subprocess.
|
||||||
$i start
|
$i start
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -6,12 +6,12 @@ echo "Store dmesg logs"
|
|||||||
|
|
||||||
DMESG_LOG=/opt/wz_mini/log/dmesg
|
DMESG_LOG=/opt/wz_mini/log/dmesg
|
||||||
if [[ -e $DMESG_LOG.log || -L $DMESG_LOG.log ]] ; then
|
if [[ -e $DMESG_LOG.log || -L $DMESG_LOG.log ]] ; then
|
||||||
i=0
|
i=0
|
||||||
while [[ -e $DMESG_LOG.log.$i || -L $DMESG_LOG.log.$i ]] ; do
|
while [[ -e $DMESG_LOG.log.$i || -L $DMESG_LOG.log.$i ]] ; do
|
||||||
let i++
|
let i++
|
||||||
done
|
done
|
||||||
mv $DMESG_LOG.log $DMESG_LOG.log.$i
|
mv $DMESG_LOG.log $DMESG_LOG.log.$i
|
||||||
DMESG_LOG=$DMESG_LOG
|
DMESG_LOG=$DMESG_LOG
|
||||||
fi
|
fi
|
||||||
touch -- "$DMESG_LOG".log
|
touch -- "$DMESG_LOG".log
|
||||||
dmesg > $DMESG_LOG.log 2>&1
|
dmesg > $DMESG_LOG.log 2>&1
|
||||||
@ -19,5 +19,5 @@ dmesg > $DMESG_LOG.log 2>&1
|
|||||||
echo "Deleting logs older than 5 boots..."
|
echo "Deleting logs older than 5 boots..."
|
||||||
|
|
||||||
find /opt/wz_mini/log -name '*log*' | while read file; do
|
find /opt/wz_mini/log -name '*log*' | while read file; do
|
||||||
[ "${file#/opt/wz_mini/log/*log.}" -gt 5 ] && rm -v "$file"
|
[ "${file#/opt/wz_mini/log/*log.}" -gt 5 ] && rm -v "$file"
|
||||||
done
|
done
|
||||||
|
@ -1,28 +1,45 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Extract Swap archive
|
||||||
|
# Description: Enable required swap file for system. System will crash without it.
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/etc/rc.common
|
. /opt/wz_mini/wz_mini.conf
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/etc/rc.common
|
||||||
|
|
||||||
if [ -e /opt/wz_mini/swap.gz ]; then
|
case "$1" in
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
start)
|
||||||
LD_LIBRARY_PATH='/opt/wz_mini/lib' /opt/wz_mini/bin/audioplay_t20 /opt/wz_mini/usr/share/audio/swap_v2.wav $AUDIO_PROMPT_VOLUME
|
|
||||||
else
|
echo "#####$(basename "$0")#####"
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/audio.ko spk_gpio=$GPIO alc_mode=0 mic_gain=0
|
|
||||||
/opt/wz_mini/bin/audioplay_t31 /opt/wz_mini/usr/share/audio/swap.wav $AUDIO_PROMPT_VOLUME
|
|
||||||
rmmod audio
|
if [ -e /opt/wz_mini/swap.gz ]; then
|
||||||
fi
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
echo "Swap archive present, extracting"
|
LD_LIBRARY_PATH='/opt/wz_mini/lib' /opt/wz_mini/bin/audioplay_t20 /opt/wz_mini/usr/share/audio/swap_v2.wav $AUDIO_PROMPT_VOLUME
|
||||||
gzip -d /opt/wz_mini/swap.gz
|
else
|
||||||
mkswap /opt/wz_mini/swap
|
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/audio.ko spk_gpio=$GPIO alc_mode=0 mic_gain=0
|
||||||
sync;echo 3 > /proc/sys/vm/drop_caches
|
/opt/wz_mini/bin/audioplay_t31 /opt/wz_mini/usr/share/audio/swap.wav $AUDIO_PROMPT_VOLUME
|
||||||
else
|
rmmod audio
|
||||||
echo "Swap archive missing, not extracting"
|
fi
|
||||||
fi
|
echo "Swap archive present, extracting"
|
||||||
|
gzip -d /opt/wz_mini/swap.gz
|
||||||
|
mkswap /opt/wz_mini/swap
|
||||||
|
sync;echo 3 > /proc/sys/vm/drop_caches
|
||||||
|
else
|
||||||
|
echo "Swap archive missing, not extracting"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$ENABLE_SWAP" == "true" ]] && [[ -e /opt/wz_mini/swap ]]; then
|
||||||
|
echo "Swap file found, enable"
|
||||||
|
/opt/wz_mini/bin/busybox swapon /opt/wz_mini/swap
|
||||||
|
else
|
||||||
|
echo "Swap file missing"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
#SWAP FILE IS REQUIRED FOR OPERATION!
|
|
||||||
if [[ "$ENABLE_SWAP" == "true" ]] && [[ -e /opt/wz_mini/swap ]]; then
|
|
||||||
echo "Swap file found, enable"
|
|
||||||
/opt/wz_mini/bin/busybox swapon /opt/wz_mini/swap
|
|
||||||
else
|
|
||||||
echo "Swap file missing"
|
|
||||||
fi
|
|
||||||
|
@ -1,53 +1,71 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: USB Ethernet Support
|
||||||
|
# Description: Enable USB Ethernet adapter support and kernel module
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/etc/rc.common
|
. /opt/wz_mini/etc/rc.common
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
if [[ "$ENABLE_USB_ETH" == "true" ]]; then
|
case "$1" in
|
||||||
|
start)
|
||||||
|
|
||||||
insmod $KMOD_PATH/kernel/drivers/net/usb/usbnet.ko
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
# Auto-Detect an Ethernet Driver and load it
|
|
||||||
if [[ "$ENABLE_USB_ETH_MODULE_AUTODETECT" == "true" ]]; then
|
|
||||||
for DEVICE in `lsusb | awk '{print $6}'| tr '[:upper:]' '[:lower:]'`; do
|
|
||||||
case $DEVICE in
|
|
||||||
'077b:2226' | '0846:1040' | '2001:1a00' | '0b95:1720' | '07b8:420a' |\
|
|
||||||
'08dd:90ff' | '0557:2009' | '0411:003d' | '0411:006e' | '6189:182d' |\
|
|
||||||
'0df6:0056' | '07aa:0017' | '1189:0893' | '1631:6200' | '04f1:3008' |\
|
|
||||||
'17ef:7203' | '0b95:772b' | '0b95:7720' | '0b95:1780' | '0789:0160' |\
|
|
||||||
'13b1:0018' | '1557:7720' | '07d1:3c05' | '2001:3c05' | '2001:1a02' |\
|
|
||||||
'1737:0039' | '04bb:0930' | '050d:5055' | '05ac:1402' | '0b95:772a' |\
|
|
||||||
'14ea:ab11' | '0db0:a877' | '0b95:7e2b' | '0b95:172a' | '066b:20f9')
|
|
||||||
echo "Loading ASIX Ethernet driver..."
|
|
||||||
modprobe asix
|
|
||||||
;;
|
|
||||||
'0b95:1790' | '0b95:178a' | '0df6:0072')
|
|
||||||
echo "Loading AX88179 Gigabit Ethernet driver..."
|
|
||||||
modprobe ax88179_178a
|
|
||||||
;;
|
|
||||||
'1004:61aa' | '046d:c11f' | '1410:b001' | '1410:9010' | '413c:8195' |\
|
|
||||||
'413c:8196' | '413c:819b' | '16d5:650a' | '12d1:14ac')
|
|
||||||
echo "Loading USB CDC Ethernet driver..."
|
|
||||||
modprobe cdc_ether
|
|
||||||
;;
|
|
||||||
'0bda:8152')
|
|
||||||
echo "Loading Realtek RTL8152 driver..."
|
|
||||||
modprobe r8152
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Manually load any other Ethernet Drivers if asked for
|
if [[ "$ENABLE_USB_ETH" == "true" ]]; then
|
||||||
if [[ "$ENABLE_USB_ETH_MODULE_MANUAL" != "" ]]; then
|
|
||||||
for i in $(echo "$ENABLE_USB_ETH_MODULE_MANUAL" | tr "," "\n")
|
|
||||||
do
|
|
||||||
insmod $KMOD_PATH/kernel/drivers/net/usb/$i.ko
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat /sys/class/net/eth0/address | tr '[:lower:]' '[:upper:]' > /opt/wz_mini/tmp/eth0_mac
|
insmod $KMOD_PATH/kernel/drivers/net/usb/usbnet.ko
|
||||||
|
|
||||||
|
echo "Auto-Detect an Ethernet Driver and load it"
|
||||||
|
if [[ "$ENABLE_USB_ETH_MODULE_AUTODETECT" == "true" ]]; then
|
||||||
|
for DEVICE in `lsusb | awk '{print $6}'| tr '[:upper:]' '[:lower:]'`; do
|
||||||
|
case $DEVICE in
|
||||||
|
'077b:2226' | '0846:1040' | '2001:1a00' | '0b95:1720' | '07b8:420a' |\
|
||||||
|
'08dd:90ff' | '0557:2009' | '0411:003d' | '0411:006e' | '6189:182d' |\
|
||||||
|
'0df6:0056' | '07aa:0017' | '1189:0893' | '1631:6200' | '04f1:3008' |\
|
||||||
|
'17ef:7203' | '0b95:772b' | '0b95:7720' | '0b95:1780' | '0789:0160' |\
|
||||||
|
'13b1:0018' | '1557:7720' | '07d1:3c05' | '2001:3c05' | '2001:1a02' |\
|
||||||
|
'1737:0039' | '04bb:0930' | '050d:5055' | '05ac:1402' | '0b95:772a' |\
|
||||||
|
'14ea:ab11' | '0db0:a877' | '0b95:7e2b' | '0b95:172a' | '066b:20f9')
|
||||||
|
echo "Loading ASIX Ethernet driver..."
|
||||||
|
modprobe asix
|
||||||
|
;;
|
||||||
|
'0b95:1790' | '0b95:178a' | '0df6:0072')
|
||||||
|
echo "Loading AX88179 Gigabit Ethernet driver..."
|
||||||
|
modprobe ax88179_178a
|
||||||
|
;;
|
||||||
|
'1004:61aa' | '046d:c11f' | '1410:b001' | '1410:9010' | '413c:8195' |\
|
||||||
|
'413c:8196' | '413c:819b' | '16d5:650a' | '12d1:14ac')
|
||||||
|
echo "Loading USB CDC Ethernet driver..."
|
||||||
|
modprobe cdc_ether
|
||||||
|
;;
|
||||||
|
'0bda:8152')
|
||||||
|
echo "Loading Realtek RTL8152 driver..."
|
||||||
|
modprobe r8152
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Manually load any other Ethernet Drivers if asked for"
|
||||||
|
if [[ "$ENABLE_USB_ETH_MODULE_MANUAL" != "" ]]; then
|
||||||
|
for i in $(echo "$ENABLE_USB_ETH_MODULE_MANUAL" | tr "," "\n")
|
||||||
|
do
|
||||||
|
insmod $KMOD_PATH/kernel/drivers/net/usb/$i.ko
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat /sys/class/net/eth0/address | tr '[:lower:]' '[:upper:]' > /opt/wz_mini/tmp/eth0_mac
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "USB Ethernet disabled"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
else
|
|
||||||
echo "USB Ethernet disabled"
|
|
||||||
fi
|
|
||||||
|
@ -1,37 +1,54 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: USB Direct Networking
|
||||||
|
# Description: Enable USB Direct Networking kernel modules and support
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/etc/rc.common
|
. /opt/wz_mini/etc/rc.common
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
if [[ "$ENABLE_USB_DIRECT" == "true" ]]; then
|
case "$1" in
|
||||||
|
start)
|
||||||
|
|
||||||
HOST_MACADDR=$(echo "$CUSTOM_HOSTNAME"|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/')
|
echo "#####$(basename "$0")#####"
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
|
||||||
echo connect > /sys/devices/platform/jz-dwc2/dwc2/udc/dwc2/soft_connect
|
|
||||||
sleep 1
|
|
||||||
devmem 0x10000040 32 0x0b800096
|
|
||||||
sleep 1
|
|
||||||
devmem 0x13500000 32 0x001100cc
|
|
||||||
else
|
|
||||||
#Set dwc2 ID_PIN driver memory
|
|
||||||
devmem 0x13500000 32 0x001100cc
|
|
||||||
devmem 0x10000040 32 0x0b000096
|
|
||||||
#wipe the bits to set the ID_PIN, only for the V3.
|
|
||||||
devmem 0x10000040 32 0x0b000FFF
|
|
||||||
fi
|
|
||||||
|
|
||||||
insmod $KMOD_PATH/kernel/drivers/usb/gadget/libcomposite.ko
|
if [[ "$ENABLE_USB_DIRECT" == "true" ]]; then
|
||||||
|
|
||||||
if [ -f /opt/wz_mini/tmp/.T31 ]; then
|
HOST_MACADDR=$(echo "$CUSTOM_HOSTNAME"|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/')
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/kernel/drivers/usb/gadget/u_ether.ko
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/kernel/drivers/usb/gadget/usb_f_ncm.ko
|
echo connect > /sys/devices/platform/jz-dwc2/dwc2/udc/dwc2/soft_connect
|
||||||
fi
|
sleep 1
|
||||||
|
devmem 0x10000040 32 0x0b800096
|
||||||
|
sleep 1
|
||||||
|
devmem 0x13500000 32 0x001100cc
|
||||||
|
else
|
||||||
|
echo "Set dwc2 ID_PIN driver memory"
|
||||||
|
devmem 0x13500000 32 0x001100cc
|
||||||
|
devmem 0x10000040 32 0x0b000096
|
||||||
|
echo "wipe dwc2 memory bits to set the ID_PIN, only for the V3"
|
||||||
|
devmem 0x10000040 32 0x0b000FFF
|
||||||
|
fi
|
||||||
|
|
||||||
insmod $KMOD_PATH/kernel/drivers/usb/gadget/g_ncm.ko iManufacturer=wz_mini_ncm host_addr="$HOST_MACADDR" dev_addr="$USB_DIRECT_MAC_ADDR"
|
insmod $KMOD_PATH/kernel/drivers/usb/gadget/libcomposite.ko
|
||||||
|
|
||||||
echo "USB Direct enabled"
|
if [ -f /opt/wz_mini/tmp/.T31 ]; then
|
||||||
|
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/kernel/drivers/usb/gadget/u_ether.ko
|
||||||
|
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/kernel/drivers/usb/gadget/usb_f_ncm.ko
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
insmod $KMOD_PATH/kernel/drivers/usb/gadget/g_ncm.ko iManufacturer=wz_mini_ncm host_addr="$HOST_MACADDR" dev_addr="$USB_DIRECT_MAC_ADDR"
|
||||||
echo "USB Direct disabled"
|
|
||||||
|
echo "USB Direct enabled"
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "USB Direct disabled"
|
||||||
|
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
fi
|
|
||||||
|
@ -1,21 +1,35 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: USB RNDIS Tethering Support
|
||||||
|
# Description: Enable USB RNDIS Tethering kernel modules and support
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/etc/rc.common
|
. /opt/wz_mini/etc/rc.common
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
if [[ "$ENABLE_USB_RNDIS" == "true" ]]; then
|
case "$1" in
|
||||||
if [[ "$ENABLE_USB_ETH" == "true" ]] || [[ "$ENABLE_USB_DIRECT" == "true" ]]; then
|
start)
|
||||||
echo "RNDIS is not compatible with ENABLE_USB_ETH or ENABLE_USB_DIRECT. Please enable only ENABLE_USB_RNDIS"
|
|
||||||
else
|
|
||||||
|
|
||||||
insmod $KMOD_PATH/kernel/drivers/net/usb/usbnet.ko
|
if [[ "$ENABLE_USB_RNDIS" == "true" ]]; then
|
||||||
insmod $KMOD_PATH/kernel/drivers/net/usb/cdc_ether.ko
|
if [[ "$ENABLE_USB_ETH" == "true" ]] || [[ "$ENABLE_USB_DIRECT" == "true" ]]; then
|
||||||
insmod $KMOD_PATH/kernel/drivers/net/usb/rndis_host.ko
|
echo "RNDIS is not compatible with ENABLE_USB_ETH or ENABLE_USB_DIRECT. Please enable only ENABLE_USB_RNDIS"
|
||||||
|
else
|
||||||
|
|
||||||
fi
|
insmod $KMOD_PATH/kernel/drivers/net/usb/usbnet.ko
|
||||||
|
insmod $KMOD_PATH/kernel/drivers/net/usb/cdc_ether.ko
|
||||||
|
insmod $KMOD_PATH/kernel/drivers/net/usb/rndis_host.ko
|
||||||
|
|
||||||
echo "USB RNDIS enabled"
|
fi
|
||||||
else
|
|
||||||
echo "USB RNDIS disabled"
|
|
||||||
|
|
||||||
fi
|
echo "USB RNDIS enabled"
|
||||||
|
else
|
||||||
|
echo "USB RNDIS disabled"
|
||||||
|
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
@ -1,28 +1,33 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Configure alternate networking
|
||||||
|
# Description: Configure networking that is not onboard WLAN
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/etc/rc.common
|
. /opt/wz_mini/etc/rc.common
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
alternate_iface() {
|
alternate_iface() {
|
||||||
|
|
||||||
if [[ "$ENABLE_USB_ETH" == "true" ]] || [[ "$ENABLE_USB_DIRECT" == "true" ]] || [[ "$ENABLE_USB_RNDIS" == "true" ]]; then
|
if [[ "$ENABLE_USB_ETH" == "true" ]] || [[ "$ENABLE_USB_DIRECT" == "true" ]] || [[ "$ENABLE_USB_RNDIS" == "true" ]]; then
|
||||||
|
wait_for_wlan_wpa $(basename "$0")
|
||||||
|
|
||||||
wait_for_wlan_wpa
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
##Fool iCamera by renaming the hardline interface to wlan0
|
echo "Renaming interfaces"
|
||||||
echo "Renaming interfaces"
|
ifconfig $ALT_IFACE down
|
||||||
ifconfig $ALT_IFACE down
|
|
||||||
|
|
||||||
ifconfig wlan0 down
|
ifconfig wlan0 down
|
||||||
/opt/wz_mini/bin/busybox ip link set wlan0 name wlanold
|
/opt/wz_mini/bin/busybox ip link set wlan0 name wlanold
|
||||||
/opt/wz_mini/bin/busybox ip addr flush dev wlanold
|
/opt/wz_mini/bin/busybox ip addr flush dev wlanold
|
||||||
/opt/wz_mini/bin/busybox ip link set $ALT_IFACE name wlan0
|
/opt/wz_mini/bin/busybox ip link set $ALT_IFACE name wlan0
|
||||||
|
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
mount -o bind /opt/wz_mini/bin/wpa_cli.sh /system/bin/wpa_cli
|
mount -o bind /opt/wz_mini/bin/wpa_cli.sh /system/bin/wpa_cli
|
||||||
else
|
else
|
||||||
mount -o bind /opt/wz_mini/bin/wpa_cli.sh /bin/wpa_cli
|
mount -o bind /opt/wz_mini/bin/wpa_cli.sh /bin/wpa_cli
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "No alternate iface enabled"
|
echo "No alternate iface enabled"
|
||||||
@ -30,6 +35,17 @@ alternate_iface() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ! [[ "$BONDING_ENABLED" == "true" ]]; then
|
case "$1" in
|
||||||
alternate_iface &
|
start)
|
||||||
fi
|
|
||||||
|
if ! [[ "$BONDING_ENABLED" == "true" ]]; then
|
||||||
|
alternate_iface &
|
||||||
|
fi
|
||||||
|
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@ -1,78 +1,95 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Network bonding support
|
||||||
|
# Description: Enable bonding support as configured by user
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/etc/rc.common
|
. /opt/wz_mini/etc/rc.common
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
bonding_setup() {
|
bonding_setup() {
|
||||||
|
|
||||||
#we need to wait until wlan0 is up with the modified HWaddr
|
echo "#####$(basename "$0")#####"
|
||||||
wait_for_wlan_wpa
|
|
||||||
|
echo "waiting until wlan0 is up with the modified HWaddr"
|
||||||
|
wait_for_wlan_wpa $(basename "$0")
|
||||||
|
|
||||||
##Fool iCamera by renaming the hardline interface to wlan0
|
##Fool iCamera by renaming the hardline interface to wlan0
|
||||||
|
|
||||||
## $1 Bonding Interface, $2 Primary Interface, $3 Secondary Interface
|
## $1 Bonding Interface, $2 Primary Interface, $3 Secondary Interface
|
||||||
echo "renaming interfaces"
|
echo "renaming interfaces"
|
||||||
|
|
||||||
#Prevent iCamera from cycling the wlan0 interface
|
#Prevent iCamera from cycling the wlan0 interface
|
||||||
mount --bind /opt/wz_mini/usr/bin/restart_wlan0.sh /system/bin/restart_wlan0.sh
|
mount --bind /opt/wz_mini/usr/bin/restart_wlan0.sh /system/bin/restart_wlan0.sh
|
||||||
|
|
||||||
# Bring all interfaces down
|
# Bring all interfaces down
|
||||||
ifconfig bond0 down
|
ifconfig bond0 down
|
||||||
ifconfig $BONDING_PRIMARY_INTERFACE down
|
ifconfig $BONDING_PRIMARY_INTERFACE down
|
||||||
ifconfig $BONDING_SECONDARY_INTERFACE down
|
ifconfig $BONDING_SECONDARY_INTERFACE down
|
||||||
|
|
||||||
# Have to bring bonding interface up to be able to bond our slaves.
|
# Have to bring bonding interface up to be able to bond our slaves.
|
||||||
/opt/wz_mini/bin/busybox ip link set bond0 up
|
/opt/wz_mini/bin/busybox ip link set bond0 up
|
||||||
|
|
||||||
# Rename the real wlan0 interface if needed/used
|
# Rename the real wlan0 interface if needed/used
|
||||||
if [[ "$BONDING_PRIMARY_INTERFACE" == "wlan0" ]]; then
|
if [[ "$BONDING_PRIMARY_INTERFACE" == "wlan0" ]]; then
|
||||||
/opt/wz_mini/bin/busybox ip link set $BONDING_PRIMARY_INTERFACE name wlanold
|
/opt/wz_mini/bin/busybox ip link set $BONDING_PRIMARY_INTERFACE name wlanold
|
||||||
/opt/wz_mini/bin/busybox ip addr flush dev wlanold
|
/opt/wz_mini/bin/busybox ip addr flush dev wlanold
|
||||||
BONDING_PRIMARY_INTERFACE="wlanold"
|
BONDING_PRIMARY_INTERFACE="wlanold"
|
||||||
# Because we just changed the name of the primary interface, we need to
|
# Because we just changed the name of the primary interface, we need to
|
||||||
# tell the bonding driver about the name change as well.
|
# tell the bonding driver about the name change as well.
|
||||||
echo "$BONDING_PRIMARY_INTERFACE" > /sys/devices/virtual/net/bond0/bonding/primary
|
echo "$BONDING_PRIMARY_INTERFACE" > /sys/devices/virtual/net/bond0/bonding/primary
|
||||||
fi
|
fi
|
||||||
if [[ "$BONDING_SECONDARY_INTERFACE" == "wlan0" ]]; then
|
if [[ "$BONDING_SECONDARY_INTERFACE" == "wlan0" ]]; then
|
||||||
/opt/wz_mini/bin/busybox ip link set $BONDING_SECONDARY_INTERFACE name wlanold
|
/opt/wz_mini/bin/busybox ip link set $BONDING_SECONDARY_INTERFACE name wlanold
|
||||||
/opt/wz_mini/bin/busybox ip addr flush dev wlanold
|
/opt/wz_mini/bin/busybox ip addr flush dev wlanold
|
||||||
BONDING_SECONDARY_INTERFACE="wlanold"
|
BONDING_SECONDARY_INTERFACE="wlanold"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Enslave the Ethernet and Original Wifi interfaces
|
# Enslave the Ethernet and Original Wifi interfaces
|
||||||
# under the bonding interface.
|
# under the bonding interface.
|
||||||
/opt/wz_mini/tmp/.bin/ifenslave bond0 $BONDING_PRIMARY_INTERFACE $BONDING_SECONDARY_INTERFACE
|
/opt/wz_mini/tmp/.bin/ifenslave bond0 $BONDING_PRIMARY_INTERFACE $BONDING_SECONDARY_INTERFACE
|
||||||
|
|
||||||
# Have to bring bonding interface down to be rename the interface
|
# Have to bring bonding interface down to be rename the interface
|
||||||
/opt/wz_mini/bin/busybox ip link set bond0 down
|
/opt/wz_mini/bin/busybox ip link set bond0 down
|
||||||
|
|
||||||
# Name the bonding interface to be the "new" wlan0 interface
|
# Name the bonding interface to be the "new" wlan0 interface
|
||||||
/opt/wz_mini/bin/busybox ip link set bond0 name wlan0
|
/opt/wz_mini/bin/busybox ip link set bond0 name wlan0
|
||||||
|
|
||||||
# Bring the newly renamed wlan0 (actually the bond interface) back up in the next step
|
# Bring the newly renamed wlan0 (actually the bond interface) back up in the next step
|
||||||
|
|
||||||
#Run the DHCP client, and bind mount our fake wpa_cli.sh to fool iCamera
|
#Run the DHCP client, and bind mount our fake wpa_cli.sh to fool iCamera
|
||||||
ifconfig wlan0 up
|
ifconfig wlan0 up
|
||||||
pkill udhcpc
|
pkill udhcpc
|
||||||
udhcpc -i wlan0 -x hostname:$CUSTOM_HOSTNAME -p /var/run/udhcpc.pid -b
|
udhcpc -i wlan0 -x hostname:$CUSTOM_HOSTNAME -p /var/run/udhcpc.pid -b
|
||||||
|
|
||||||
# If running with Interface Bonding enabled, kill any existing
|
# If running with Interface Bonding enabled, kill any existing
|
||||||
# wpa_supplicant that might be running and spawn our own instead
|
# wpa_supplicant that might be running and spawn our own instead
|
||||||
|
|
||||||
if [[ "$BONDING_ENABLED" == "true" ]] && ([[ "$ENABLE_USB_ETH" == "true" ]] || [[ "$ENABLE_USB_DIRECT" == "true" ]]); then
|
if [[ "$BONDING_ENABLED" == "true" ]] && ([[ "$ENABLE_USB_ETH" == "true" ]] || [[ "$ENABLE_USB_DIRECT" == "true" ]]); then
|
||||||
echo "Restarting wpa_supplicant due to bonding"
|
echo "Restarting wpa_supplicant due to bonding"
|
||||||
/opt/wz_mini/bin/busybox killall wpa_supplicant
|
/opt/wz_mini/bin/busybox killall wpa_supplicant
|
||||||
wpa_supplicant -D nl80211 -i wlanold -c /tmp/wpa_supplicant.conf -B -s
|
wpa_supplicant -D nl80211 -i wlanold -c /tmp/wpa_supplicant.conf -B -s
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
mount -o bind /opt/wz_mini/bin/wpa_cli.sh /system/bin/wpa_cli
|
mount -o bind /opt/wz_mini/bin/wpa_cli.sh /system/bin/wpa_cli
|
||||||
else
|
else
|
||||||
mount -o bind /opt/wz_mini/bin/wpa_cli.sh /bin/wpa_cli
|
mount -o bind /opt/wz_mini/bin/wpa_cli.sh /bin/wpa_cli
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ "$BONDING_ENABLED" == "true" ]] && ([[ "$ENABLE_USB_ETH" == "true" ]] || [[ "$ENABLE_USB_DIRECT" == "true" ]]); then
|
|
||||||
bonding_setup &
|
case "$1" in
|
||||||
fi
|
start)
|
||||||
|
if [[ "$BONDING_ENABLED" == "true" ]] && ([[ "$ENABLE_USB_ETH" == "true" ]] || [[ "$ENABLE_USB_DIRECT" == "true" ]]); then
|
||||||
|
bonding_setup &
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@ -1,18 +1,31 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Disable coredump
|
||||||
|
# Description: Disable dumpload and disable kernel coredump support
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/etc/rc.common
|
. /opt/wz_mini/etc/rc.common
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
core() {
|
core() {
|
||||||
|
wait_for_wlan_wpa $(basename "$0")
|
||||||
|
|
||||||
#Kill dumpload so it won't waste cpu or ram gathering cores and uploading them when something crashes
|
echo "#####$(basename "$0")#####"
|
||||||
wait_for_wlan_wpa
|
|
||||||
|
|
||||||
echo "killing dumpload"
|
echo "Killing dumpload"
|
||||||
/opt/wz_mini/bin/busybox pkill -f dumpload
|
/opt/wz_mini/bin/busybox pkill -f dumpload
|
||||||
|
|
||||||
|
echo "Setting kernel core pattern"
|
||||||
|
sysctl -w kernel.core_pattern='|/bin/false' > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
sysctl -w kernel.core_pattern='|/bin/false'
|
case "$1" in
|
||||||
|
start)
|
||||||
|
core &
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
core &
|
|
||||||
|
@ -1,16 +1,34 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: FW Upgrade Intercept
|
||||||
|
# Description: Intercept FW Upgrades from vendor
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
|
if [[ "$DISABLE_FW_UPGRADE" == "true" ]]; then
|
||||||
|
mkdir /tmp/Upgrade
|
||||||
|
mount -t tmpfs -o size=1,nr_inodes=1 none /tmp/Upgrade
|
||||||
|
#Setting this host causes iCamera to segfault, lets ignore it for now
|
||||||
|
#echo -e "127.0.0.1 localhost \n127.0.0.1 wyze-upgrade-service.wyzecam.com" > /opt/wz_mini/tmp/.storage/hosts
|
||||||
|
#mount --bind /opt/wz_mini/tmp/.storage/hosts /etc/hosts
|
||||||
|
/opt/wz_mini/bin/busybox inotifyd /opt/wz_mini/usr/bin/watch_up.sh /tmp:n > /dev/null 2>&1 &
|
||||||
|
echo "Firmware updates disabled"
|
||||||
|
else
|
||||||
|
echo "Firmwware updates enabled, monitor script running"
|
||||||
|
mkdir /tmp/Upgrade
|
||||||
|
/opt/wz_mini/bin/busybox inotifyd /opt/wz_mini/usr/bin/watch_up.sh /tmp:n > /dev/null 2>&1 &
|
||||||
|
fi
|
||||||
|
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [[ "$DISABLE_FW_UPGRADE" == "true" ]]; then
|
|
||||||
mkdir /tmp/Upgrade
|
|
||||||
mount -t tmpfs -o size=1,nr_inodes=1 none /tmp/Upgrade
|
|
||||||
#Setting this host causes iCamera to segfault, lets ignore it for now
|
|
||||||
#echo -e "127.0.0.1 localhost \n127.0.0.1 wyze-upgrade-service.wyzecam.com" > /opt/wz_mini/tmp/.storage/hosts
|
|
||||||
#mount --bind /opt/wz_mini/tmp/.storage/hosts /etc/hosts
|
|
||||||
/opt/wz_mini/bin/busybox inotifyd /opt/wz_mini/usr/bin/watch_up.sh /tmp:n > /dev/null 2>&1 &
|
|
||||||
echo "Firmware updates disabled"
|
|
||||||
else
|
|
||||||
mkdir /tmp/Upgrade
|
|
||||||
/opt/wz_mini/bin/busybox inotifyd /opt/wz_mini/usr/bin/watch_up.sh /tmp:n > /dev/null 2>&1 &
|
|
||||||
fi
|
|
||||||
|
@ -1,23 +1,38 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: MP4WRITE Support
|
||||||
|
# Description: Prevent system trashing with mp4write support provided by libcallback, temporary video files are written direct to media instead of /tmp
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/etc/rc.common
|
. /opt/wz_mini/etc/rc.common
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
|
|
||||||
mp4write() {
|
mp4write() {
|
||||||
|
|
||||||
wait_for_icamera
|
wait_for_icamera
|
||||||
|
|
||||||
if [[ "$ENABLE_MP4_WRITE" == "true" ]]; then
|
echo "#####$(basename "$0")#####"
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
|
||||||
echo "mp4_write is not supported on T20"
|
if [[ "$ENABLE_MP4_WRITE" == "true" ]]; then
|
||||||
else
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
/opt/wz_mini/bin/cmd mp4write on
|
echo "mp4_write is not supported on T20"
|
||||||
echo "mp4_write enabled"
|
else
|
||||||
fi
|
/opt/wz_mini/bin/cmd mp4write on > /dev/null
|
||||||
else
|
echo "mp4_write enabled"
|
||||||
echo "mp4_write disabled"
|
fi
|
||||||
fi
|
else
|
||||||
|
echo "mp4_write disabled"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
mp4write &
|
case "$1" in
|
||||||
|
start)
|
||||||
|
mp4write &
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@ -1,8 +1,25 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Enable NightDrop support
|
||||||
|
# Description: Prevent the system from dropping FPS during night mode
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
|
||||||
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
|
if [[ "$NIGHT_DROP_DISABLE" == "true" ]]; then
|
||||||
|
echo "Night Drop Disable, Enabled"
|
||||||
|
touch /opt/wz_mini/tmp/.nd
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [[ "$NIGHT_DROP_DISABLE" == "true" ]]; then
|
|
||||||
echo "Night Drop Disable, Enabled"
|
|
||||||
touch /opt/wz_mini/tmp/.nd
|
|
||||||
fi
|
|
||||||
|
@ -1,8 +1,27 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Disable Motor
|
||||||
|
# Description: Disable Motor on specified devices
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
|
if [[ "$DISABLE_MOTOR" == "true" ]]; then
|
||||||
|
echo "Motor Disabled"
|
||||||
|
touch /opt/wz_mini/tmp/.ms
|
||||||
|
else
|
||||||
|
echo "Motor enabled"
|
||||||
|
fi
|
||||||
|
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [[ "$DISABLE_MOTOR" == "true" ]]; then
|
|
||||||
echo "Motor Disabled"
|
|
||||||
touch /opt/wz_mini/tmp/.ms
|
|
||||||
fi
|
|
||||||
|
@ -1,23 +1,39 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Set system FPS
|
||||||
|
# Description: Set system FPS if greater than factory defaults
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
#Set system FPS if greater than default
|
case "$1" in
|
||||||
|
start)
|
||||||
|
|
||||||
if [ $RTSP_HI_RES_FPS -gt 20 ]; then
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
if cat /configs/.user_config | grep fps; then
|
echo "Seting system FPS if greater than default"
|
||||||
sed -i "s/fps.*/fps\=$RTSP_HI_RES_FPS/" /configs/.user_config
|
|
||||||
else
|
|
||||||
sed -i "/\[SETTING\].*/a fps=$RTSP_HI_RES_FPS" /configs/.user_config
|
|
||||||
fi
|
|
||||||
|
|
||||||
elif [ $RTSP_LOW_RES_FPS -gt 20 ]; then
|
if [ $RTSP_HI_RES_FPS -gt 20 ]; then
|
||||||
|
if cat /configs/.user_config | grep fps; then
|
||||||
|
sed -i "s/fps.*/fps\=$RTSP_HI_RES_FPS/" /configs/.user_config
|
||||||
|
else
|
||||||
|
sed -i "/\[SETTING\].*/a fps=$RTSP_HI_RES_FPS" /configs/.user_config
|
||||||
|
fi
|
||||||
|
|
||||||
if cat /configs/.user_config | grep fps; then
|
elif [ $RTSP_LOW_RES_FPS -gt 20 ]; then
|
||||||
sed -i "s/fps.*/fps\=$RTSP_LOW_RES_FPS/" /configs/.user_config
|
if cat /configs/.user_config | grep fps; then
|
||||||
else
|
sed -i "s/fps.*/fps\=$RTSP_LOW_RES_FPS/" /configs/.user_config
|
||||||
sed -i "/\[SETTING\].*/a fps=$RTSP_LOW_RES_FPS" /configs/.user_config
|
else
|
||||||
fi
|
sed -i "/\[SETTING\].*/a fps=$RTSP_LOW_RES_FPS" /configs/.user_config
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
fi
|
|
||||||
|
@ -1,13 +1,31 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Start cron daemon
|
||||||
|
# Description: Enable cron service
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/etc/rc.common
|
. /opt/wz_mini/etc/rc.common
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
autostart_crond() {
|
autostart_crond() {
|
||||||
wait_for_wlan_ip
|
wait_for_wlan_ip $(basename "$0")
|
||||||
/opt/wz_mini/tmp/.bin/crond -b -c /opt/wz_mini/etc/cron/
|
|
||||||
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
|
/opt/wz_mini/tmp/.bin/crond -b -c /opt/wz_mini/etc/cron/
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ "$ENABLE_CRONTAB" == "true" ]]; then
|
|
||||||
autostart_crond &
|
case "$1" in
|
||||||
fi
|
start)
|
||||||
|
if [[ "$ENABLE_CRONTAB" == "true" ]]; then
|
||||||
|
autostart_crond &
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@ -1,28 +1,43 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides:
|
||||||
|
# Short-Description: Store syslogs
|
||||||
|
# Description: Enable storing of syslogs to media
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
source /opt/wz_mini/etc/rc.common
|
. /opt/wz_mini/etc/rc.common
|
||||||
source /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
syslog_save() {
|
syslog_save() {
|
||||||
|
wait_for_icamera
|
||||||
|
|
||||||
wait_for_icamera
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
if [[ "$ENABLE_SYSLOG_SAVE" == "true" ]]; then
|
if [[ "$ENABLE_SYSLOG_SAVE" == "true" ]]; then
|
||||||
echo "Store syslog logs"
|
echo "Store syslog logs"
|
||||||
|
|
||||||
SYSLOG_LOG=/opt/wz_mini/log/syslog
|
SYSLOG_LOG=/opt/wz_mini/log/syslog
|
||||||
if [[ -e $SYSLOG_LOG.log || -L $SYSLOG_LOG.log ]] ; then
|
if [[ -e $SYSLOG_LOG.log || -L $SYSLOG_LOG.log ]] ; then
|
||||||
i=0
|
i=0
|
||||||
while [[ -e $SYSLOG_LOG.log.$i || -L $SYSLOG_LOG.log.$i ]] ; do
|
while [[ -e $SYSLOG_LOG.log.$i || -L $SYSLOG_LOG.log.$i ]] ; do
|
||||||
let i++
|
let i++
|
||||||
done
|
done
|
||||||
mv $SYSLOG_LOG.log $SYSLOG_LOG.log.$i
|
mv $SYSLOG_LOG.log $SYSLOG_LOG.log.$i
|
||||||
SYSLOG_LOG=$SYSLOG_LOG
|
SYSLOG_LOG=$SYSLOG_LOG
|
||||||
fi
|
fi
|
||||||
touch -- "$SYSLOG_LOG".log
|
touch -- "$SYSLOG_LOG".log
|
||||||
logread -F > $SYSLOG_LOG.log &
|
logread -F > $SYSLOG_LOG.log &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
syslog_save &
|
case "$1" in
|
||||||
|
start)
|
||||||
|
syslog_save &
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Wed Aug 3 03:03:52 PM PDT 2022
|
Fri Aug 5 07:37:04 PM PDT 2022
|
||||||
|
@ -13,142 +13,142 @@ RE_RUN_DELAY=60
|
|||||||
PARM=1
|
PARM=1
|
||||||
|
|
||||||
hi_res_monitor() {
|
hi_res_monitor() {
|
||||||
if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
||||||
|
|
||||||
if [[ "$RTSP_HI_RES_ENC_PARAMETER" != "" ]]; then
|
if [[ "$RTSP_HI_RES_ENC_PARAMETER" != "" ]]; then
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
if [[ $RTSP_HI_RES_ENC_PARAMETER =~ "^[0|1|2|4|8]$" ]]; then
|
if [[ $RTSP_HI_RES_ENC_PARAMETER =~ "^[0|1|2|4|8]$" ]]; then
|
||||||
/system/bin/impdbg --enc_rc_s 0:0:4:$RTSP_HI_RES_ENC_PARAMETER
|
/system/bin/impdbg --enc_rc_s 0:0:4:$RTSP_HI_RES_ENC_PARAMETER
|
||||||
sleep $DELAY_BETWEEN
|
sleep $DELAY_BETWEEN
|
||||||
PARM=$((PARM+1))
|
PARM=$((PARM+1))
|
||||||
else
|
else
|
||||||
echo "Invalid encoder value"
|
echo "Invalid encoder value"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [[ $RTSP_HI_RES_ENC_PARAMETER =~ "^[0|1|2|4|8]$" ]]; then
|
if [[ $RTSP_HI_RES_ENC_PARAMETER =~ "^[0|1|2|4|8]$" ]]; then
|
||||||
/system/bin/impdbg --enc_rc_s 0:44:4:$RTSP_HI_RES_ENC_PARAMETER
|
/system/bin/impdbg --enc_rc_s 0:44:4:$RTSP_HI_RES_ENC_PARAMETER
|
||||||
sleep $DELAY_BETWEEN
|
sleep $DELAY_BETWEEN
|
||||||
PARM=$((PARM+1))
|
PARM=$((PARM+1))
|
||||||
else
|
else
|
||||||
echo "Invalid encoder value"
|
echo "Invalid encoder value"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$RTSP_HI_RES_MAX_BITRATE" != "" ]]; then
|
if [[ "$RTSP_HI_RES_MAX_BITRATE" != "" ]]; then
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
/system/bin/impdbg --enc_rc_s 0:28:4:$RTSP_HI_RES_MAX_BITRATE
|
/system/bin/impdbg --enc_rc_s 0:28:4:$RTSP_HI_RES_MAX_BITRATE
|
||||||
sleep $DELAY_BETWEEN
|
sleep $DELAY_BETWEEN
|
||||||
PARM=$((PARM+1))
|
PARM=$((PARM+1))
|
||||||
else
|
else
|
||||||
/system/bin/impdbg --enc_rc_s 0:52:4:$RTSP_HI_RES_MAX_BITRATE
|
/system/bin/impdbg --enc_rc_s 0:52:4:$RTSP_HI_RES_MAX_BITRATE
|
||||||
sleep $DELAY_BETWEEN
|
sleep $DELAY_BETWEEN
|
||||||
PARM=$((PARM+1))
|
PARM=$((PARM+1))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$RTSP_HI_RES_TARGET_BITRATE" != "" ]]; then
|
if [[ "$RTSP_HI_RES_TARGET_BITRATE" != "" ]]; then
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
echo "not supported on T20"
|
echo "not supported on T20"
|
||||||
else
|
else
|
||||||
/system/bin/impdbg --enc_rc_s 0:48:4:$RTSP_HI_RES_TARGET_BITRATE
|
/system/bin/impdbg --enc_rc_s 0:48:4:$RTSP_HI_RES_TARGET_BITRATE
|
||||||
sleep $DELAY_BETWEEN
|
sleep $DELAY_BETWEEN
|
||||||
PARM=$((PARM+1))
|
PARM=$((PARM+1))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$RTSP_HI_RES_FPS" != "" ]]; then
|
if [[ "$RTSP_HI_RES_FPS" != "" ]]; then
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
/system/bin/impdbg --enc_rc_s 0:8:4:$RTSP_HI_RES_FPS
|
/system/bin/impdbg --enc_rc_s 0:8:4:$RTSP_HI_RES_FPS
|
||||||
sleep $DELAY_BETWEEN
|
sleep $DELAY_BETWEEN
|
||||||
PARM=$((PARM+1))
|
PARM=$((PARM+1))
|
||||||
else
|
else
|
||||||
/system/bin/impdbg --enc_rc_s 0:80:4:$RTSP_HI_RES_FPS
|
/system/bin/impdbg --enc_rc_s 0:80:4:$RTSP_HI_RES_FPS
|
||||||
sleep $DELAY_BETWEEN
|
sleep $DELAY_BETWEEN
|
||||||
PARM=$((PARM+1))
|
PARM=$((PARM+1))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $PARM == 1 ]; then
|
if [ $PARM == 1 ]; then
|
||||||
echo "No Hi-Res imp variables enabled, check Low-Res"
|
echo "No Hi-Res imp variables enabled, check Low-Res"
|
||||||
|
fi
|
||||||
|
|
||||||
|
low_res_monitor
|
||||||
|
else
|
||||||
|
echo "Hi-Res RTSP not enabled"
|
||||||
|
low_res_monitor
|
||||||
fi
|
fi
|
||||||
|
|
||||||
low_res_monitor
|
|
||||||
else
|
|
||||||
echo "Hi-Res RTSP not enabled"
|
|
||||||
low_res_monitor
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
low_res_monitor () {
|
low_res_monitor () {
|
||||||
if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
||||||
|
|
||||||
if [[ "$RTSP_LOW_RES_ENC_PARAMETER" != "" ]]; then
|
if [[ "$RTSP_LOW_RES_ENC_PARAMETER" != "" ]]; then
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
if [[ $RTSP_LOW_RES_ENC_PARAMETER =~ "^[0|1|2|4|8]$" ]]; then
|
if [[ $RTSP_LOW_RES_ENC_PARAMETER =~ "^[0|1|2|4|8]$" ]]; then
|
||||||
/system/bin/impdbg --enc_rc_s 1:0:4:$RTSP_LOW_RES_ENC_PARAMETER
|
/system/bin/impdbg --enc_rc_s 1:0:4:$RTSP_LOW_RES_ENC_PARAMETER
|
||||||
sleep $DELAY_BETWEEN
|
sleep $DELAY_BETWEEN
|
||||||
PARM=$((PARM+1))
|
PARM=$((PARM+1))
|
||||||
else
|
else
|
||||||
echo "Invalid encoder value"
|
echo "Invalid encoder value"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [[ $RTSP_LOW_RES_ENC_PARAMETER =~ "^[0|1|2|4|8]$" ]]; then
|
if [[ $RTSP_LOW_RES_ENC_PARAMETER =~ "^[0|1|2|4|8]$" ]]; then
|
||||||
/system/bin/impdbg --enc_rc_s 1:44:4:$RTSP_LOW_RES_ENC_PARAMETER
|
/system/bin/impdbg --enc_rc_s 1:44:4:$RTSP_LOW_RES_ENC_PARAMETER
|
||||||
sleep $DELAY_BETWEEN
|
sleep $DELAY_BETWEEN
|
||||||
PARM=$((PARM+1))
|
PARM=$((PARM+1))
|
||||||
else
|
else
|
||||||
echo "Invalid encoder value"
|
echo "Invalid encoder value"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$RTSP_LOW_RES_MAX_BITRATE" != "" ]]; then
|
if [[ "$RTSP_LOW_RES_MAX_BITRATE" != "" ]]; then
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
/system/bin/impdbg --enc_rc_s 1:28:4:$RTSP_LOW_RES_MAX_BITRATE
|
/system/bin/impdbg --enc_rc_s 1:28:4:$RTSP_LOW_RES_MAX_BITRATE
|
||||||
sleep $DELAY_BETWEEN
|
sleep $DELAY_BETWEEN
|
||||||
PARM=$((PARM+1))
|
PARM=$((PARM+1))
|
||||||
else
|
else
|
||||||
/system/bin/impdbg --enc_rc_s 1:52:4:$RTSP_LOW_RES_MAX_BITRATE
|
/system/bin/impdbg --enc_rc_s 1:52:4:$RTSP_LOW_RES_MAX_BITRATE
|
||||||
sleep $DELAY_BETWEEN
|
sleep $DELAY_BETWEEN
|
||||||
PARM=$((PARM+1))
|
PARM=$((PARM+1))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$RTSP_LOW_RES_TARGET_BITRATE" != "" ]]; then
|
if [[ "$RTSP_LOW_RES_TARGET_BITRATE" != "" ]]; then
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
echo "not supported on T20"
|
echo "not supported on T20"
|
||||||
else
|
else
|
||||||
/system/bin/impdbg --enc_rc_s 1:48:4:$RTSP_LOW_RES_TARGET_BITRATE
|
/system/bin/impdbg --enc_rc_s 1:48:4:$RTSP_LOW_RES_TARGET_BITRATE
|
||||||
sleep $DELAY_BETWEEN
|
sleep $DELAY_BETWEEN
|
||||||
PARM=$((PARM+1))
|
PARM=$((PARM+1))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$RTSP_LOW_RES_FPS" != "" ]]; then
|
if [[ "$RTSP_LOW_RES_FPS" != "" ]]; then
|
||||||
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
/system/bin/impdbg --enc_rc_s 1:8:4:$RTSP_LOW_RES_FPS
|
/system/bin/impdbg --enc_rc_s 1:8:4:$RTSP_LOW_RES_FPS
|
||||||
sleep $DELAY_BETWEEN
|
sleep $DELAY_BETWEEN
|
||||||
PARM=$((PARM+1))
|
PARM=$((PARM+1))
|
||||||
else
|
else
|
||||||
/system/bin/impdbg --enc_rc_s 1:80:4:$RTSP_LOW_RES_FPS
|
/system/bin/impdbg --enc_rc_s 1:80:4:$RTSP_LOW_RES_FPS
|
||||||
sleep $DELAY_BETWEEN
|
sleep $DELAY_BETWEEN
|
||||||
PARM=$((PARM+1))
|
PARM=$((PARM+1))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $PARM == 1 ]; then
|
if [ $PARM == 1 ]; then
|
||||||
echo "No Low-Res imp variables enabled, exit"
|
echo "No Low-Res imp variables enabled, exit"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo "Low-Res RTSP not enabled"
|
|
||||||
if [[ "$RTSP_HI_RES_ENABLED" == "true" ]] && [ $PARM -gt 1 ]; then
|
|
||||||
hi_res_monitor
|
|
||||||
else
|
else
|
||||||
break
|
echo "Low-Res RTSP not enabled"
|
||||||
|
if [[ "$RTSP_HI_RES_ENABLED" == "true" ]] && [ $PARM -gt 1 ]; then
|
||||||
|
hi_res_monitor
|
||||||
|
else
|
||||||
|
break
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
|
90
file.chk
90
file.chk
@ -21,59 +21,59 @@ e344ffc55222c029c5d324037a5aa1f3 SD_ROOT/wz_mini/www/car/car.js
|
|||||||
540acfdf2638c341e1d168f1af5203de SD_ROOT/wz_mini/www/car/car.css
|
540acfdf2638c341e1d168f1af5203de SD_ROOT/wz_mini/www/car/car.css
|
||||||
63b23f78d6703f0c9a2e970604104996 SD_ROOT/wz_mini/www/car/car.html
|
63b23f78d6703f0c9a2e970604104996 SD_ROOT/wz_mini/www/car/car.html
|
||||||
bd11d9a8352eca6a16554c87be50b2f5 SD_ROOT/wz_mini/www/index.html
|
bd11d9a8352eca6a16554c87be50b2f5 SD_ROOT/wz_mini/www/index.html
|
||||||
9a30c16776ac6931a313de1a85f63367 SD_ROOT/wz_mini/etc/network.d/S16rtmp
|
ad5cdda7609e706adb152c0c05e4133e SD_ROOT/wz_mini/etc/network.d/S16rtmp
|
||||||
89c8beceeaf22c8633476994baee9da2 SD_ROOT/wz_mini/etc/network.d/S09dnsmasq
|
a09fe94aa6f18319db58947a1f252c3f SD_ROOT/wz_mini/etc/network.d/S09dnsmasq
|
||||||
6f914e6567dc00dcf988ddd7053f8b61 SD_ROOT/wz_mini/etc/network.d/S04wireguard
|
b77697b15e4d6e32e6e2c8c07cbceee2 SD_ROOT/wz_mini/etc/network.d/S04wireguard
|
||||||
557060f9488606bb6817bde355b0c014 SD_ROOT/wz_mini/etc/network.d/S12remoteaccessory
|
f533b22f12b6952e2567299fd58fc927 SD_ROOT/wz_mini/etc/network.d/S12remoteaccessory
|
||||||
ac71f3b06fd9d303ffef72f5790136f6 SD_ROOT/wz_mini/etc/network.d/S15v4l2rtspserver
|
5a3469d5e53cac8d59a0fb2feffaa9e3 SD_ROOT/wz_mini/etc/network.d/S15v4l2rtspserver
|
||||||
195323ca0d9fe26cbb26e67d808737ae SD_ROOT/wz_mini/etc/network.d/S01wlanhw
|
d3ac671f88b6d639926b9f5f9a40da6e SD_ROOT/wz_mini/etc/network.d/S01wlanhw
|
||||||
4f191c79d1b755124a0dfa95dddca3e1 SD_ROOT/wz_mini/etc/network.d/S10httpd
|
6621e94ec289678afff70a2b51b42f77 SD_ROOT/wz_mini/etc/network.d/S10httpd
|
||||||
1e5365fc53f132424dec1ad73f21e9b9 SD_ROOT/wz_mini/etc/network.d/S03ipv6
|
9969970dc82daa31b41730ee460514b0 SD_ROOT/wz_mini/etc/network.d/S03ipv6
|
||||||
eaee762583ba295772686505711277f4 SD_ROOT/wz_mini/etc/network.d/S08hostname
|
edebe65d895650235f05291618814ebe SD_ROOT/wz_mini/etc/network.d/S08hostname
|
||||||
d76cec0de3b51d741196771874197b8f SD_ROOT/wz_mini/etc/network.d/S14storemac
|
9f59e3c2c3a4c9b6600eb5385e29720c SD_ROOT/wz_mini/etc/network.d/S14storemac
|
||||||
32373fa3531a11c1aad41d12830b9c04 SD_ROOT/wz_mini/etc/dnsmasq.conf
|
32373fa3531a11c1aad41d12830b9c04 SD_ROOT/wz_mini/etc/dnsmasq.conf
|
||||||
34c6a4c3a941ff2becd9f487826d7692 SD_ROOT/wz_mini/etc/uvc.config
|
34c6a4c3a941ff2becd9f487826d7692 SD_ROOT/wz_mini/etc/uvc.config
|
||||||
893b4982bb2ff2862393956e95f7ad62 SD_ROOT/wz_mini/etc/init.d/S09firstboot
|
071acd61334923a9a3e5b799e012697e SD_ROOT/wz_mini/etc/init.d/S09firstboot
|
||||||
c857ea1bfa34bec22d706566977a2d39 SD_ROOT/wz_mini/etc/init.d/S11configbackup
|
d59a0e8db7cec700c7ce4e7b2882e25e SD_ROOT/wz_mini/etc/init.d/S11configbackup
|
||||||
75bece2cfb62d4458256587b3421f756 SD_ROOT/wz_mini/etc/init.d/S10kmod
|
1b4037ffff5b86b31939ef20f2ec2a2c SD_ROOT/wz_mini/etc/init.d/S10kmod
|
||||||
97be853c83a323c58a165e0077978370 SD_ROOT/wz_mini/etc/init.d/S08passwd
|
5e27d90e6888f9665da2fb442ebd500c SD_ROOT/wz_mini/etc/init.d/S08passwd
|
||||||
4af68407a54722f24db5880e53c6c04b SD_ROOT/wz_mini/etc/init.d/S12ssh
|
8d9b5da920bf9c739517de3843631334 SD_ROOT/wz_mini/etc/init.d/S12ssh
|
||||||
234065de9a9a36fc2e8292993f00dd54 SD_ROOT/wz_mini/etc/init.d/S05mount
|
b947e5bcb9cccaaf7d970f03732fab67 SD_ROOT/wz_mini/etc/init.d/S05mount
|
||||||
cabd10978939550aac36ec6072059194 SD_ROOT/wz_mini/etc/init.d/S01bind
|
0113d8e9beb7d393c61959889193ba0e SD_ROOT/wz_mini/etc/init.d/S01bind
|
||||||
507fe51058c50407828fb7026188e5ec SD_ROOT/wz_mini/etc/init.d/S03busybox
|
74f398e735e66f91bb5ff1ea42c3760d SD_ROOT/wz_mini/etc/init.d/S03busybox
|
||||||
a27d4a0dd6582ae51db92c35cf396ac3 SD_ROOT/wz_mini/etc/init.d/wz_init.sh
|
a27d4a0dd6582ae51db92c35cf396ac3 SD_ROOT/wz_mini/etc/init.d/wz_init.sh
|
||||||
6387f4fcf1b40dc76d50eb1622526633 SD_ROOT/wz_mini/etc/init.d/S16factorycheck
|
93ac3cc23a532f73921244aa61b62362 SD_ROOT/wz_mini/etc/init.d/S16factorycheck
|
||||||
0704333eb4aa14e2c5b09282c626266a SD_ROOT/wz_mini/etc/init.d/S04model
|
95368f5581eff0e2f8eb1fac46b82c47 SD_ROOT/wz_mini/etc/init.d/S04model
|
||||||
997158df9e139fdfb1bf03b5d4ba895a SD_ROOT/wz_mini/etc/init.d/S14terminfo
|
df3911f5443239982e184af022a15815 SD_ROOT/wz_mini/etc/init.d/S14terminfo
|
||||||
84155615b192fb92a62c932cae6d190e SD_ROOT/wz_mini/etc/init.d/S07inject
|
2feeb34a9031c4a8eaf62038a7c31c65 SD_ROOT/wz_mini/etc/init.d/S07inject
|
||||||
d5c528b391309f6c4a33ce4f3dc120de SD_ROOT/wz_mini/etc/init.d/S02tmpfs
|
ce899168f0a576809238b338dec6a666 SD_ROOT/wz_mini/etc/init.d/S02tmpfs
|
||||||
e3034eac02d8eda9902ca9cf89f0a586 SD_ROOT/wz_mini/etc/inittab
|
e3034eac02d8eda9902ca9cf89f0a586 SD_ROOT/wz_mini/etc/inittab
|
||||||
840aa9c26726201f7cffbf001bee193a SD_ROOT/wz_mini/etc/uvc_jxf22.config
|
840aa9c26726201f7cffbf001bee193a SD_ROOT/wz_mini/etc/uvc_jxf22.config
|
||||||
d41d8cd98f00b204e9800998ecf8427e SD_ROOT/wz_mini/etc/rc.local.d/.gitignore
|
d41d8cd98f00b204e9800998ecf8427e SD_ROOT/wz_mini/etc/rc.local.d/.gitignore
|
||||||
99a800721bfe8a1b0e98f039175c12fd SD_ROOT/wz_mini/etc/wz_mini.conf.dist
|
99a800721bfe8a1b0e98f039175c12fd SD_ROOT/wz_mini/etc/wz_mini.conf.dist
|
||||||
4291fb00ec609b5b007ff9b3048e9248 SD_ROOT/wz_mini/etc/hosts
|
4291fb00ec609b5b007ff9b3048e9248 SD_ROOT/wz_mini/etc/hosts
|
||||||
21159766181abcce4cde59f54bb83962 SD_ROOT/wz_mini/etc/rc.common
|
00ca27c2a2da87016b258fa7445debd9 SD_ROOT/wz_mini/etc/rc.common
|
||||||
8b5e58acfcbb20034dc4873a08b45fd9 SD_ROOT/wz_mini/etc/profile
|
8b5e58acfcbb20034dc4873a08b45fd9 SD_ROOT/wz_mini/etc/profile
|
||||||
574a0198606cf3a2255843cd1ed7860a SD_ROOT/wz_mini/etc/cron/root
|
574a0198606cf3a2255843cd1ed7860a SD_ROOT/wz_mini/etc/cron/root
|
||||||
2c2df1b9cb603f9c31c46162d6ac307f SD_ROOT/wz_mini/etc/alsa/alsa.conf
|
2c2df1b9cb603f9c31c46162d6ac307f SD_ROOT/wz_mini/etc/alsa/alsa.conf
|
||||||
48c275a421535d8c21e7960545c684dc SD_ROOT/wz_mini/etc/rc.d/S18fps
|
482483f68e5f41e0c3792b2e77fc1028 SD_ROOT/wz_mini/etc/rc.d/S18fps
|
||||||
6635e9bba82d69245bbd3e47f50828d4 SD_ROOT/wz_mini/etc/rc.d/K01network
|
80650d58c240c642295448a72a49ad45 SD_ROOT/wz_mini/etc/rc.d/K01network
|
||||||
3053ed4b5fcd1dc8a38bb90e2ac5fff2 SD_ROOT/wz_mini/etc/rc.d/S17motor
|
ca8d8d8a60b3dc255133151ba33e0eb3 SD_ROOT/wz_mini/etc/rc.d/S17motor
|
||||||
3c688f5e675c18b3431543c640649810 SD_ROOT/wz_mini/etc/rc.d/S10firmware
|
03ca145794cedfe4748692dd6341839e SD_ROOT/wz_mini/etc/rc.d/S10firmware
|
||||||
b8705ccc4f08347d3676bb57f737c2a1 SD_ROOT/wz_mini/etc/rc.d/K03rcd
|
5e81ec81999790b247ef2af25cc34cb6 SD_ROOT/wz_mini/etc/rc.d/K03rcd
|
||||||
6a252a0be94933afd55f72b613fab583 SD_ROOT/wz_mini/etc/rc.d/K02webcam
|
ebfa49291afc96c4dd306101b7dec31c SD_ROOT/wz_mini/etc/rc.d/K02webcam
|
||||||
55d2f83605aea3ba553f3e984d582dc1 SD_ROOT/wz_mini/etc/rc.d/S07bonding
|
13b64fc52cb799b9575517830ca357ba SD_ROOT/wz_mini/etc/rc.d/S07bonding
|
||||||
4666beb9851dd915d924d05a9791489a SD_ROOT/wz_mini/etc/rc.d/S06networkalt
|
de825dae173ec43983d6ffa1a293060e SD_ROOT/wz_mini/etc/rc.d/S06networkalt
|
||||||
dd8ced14fa4eeceaf3c49774e8762e9b SD_ROOT/wz_mini/etc/rc.d/S14nightdrop
|
10908c95aa008ffa6ae53c6583d16ad2 SD_ROOT/wz_mini/etc/rc.d/S14nightdrop
|
||||||
e6e927ae715137152178ff317d17b8f2 SD_ROOT/wz_mini/etc/rc.d/S03ethernet
|
264bd2ac40adf4c24c081b53f9763996 SD_ROOT/wz_mini/etc/rc.d/S03ethernet
|
||||||
b4a838e79e92355a8b016b0e482b22b5 SD_ROOT/wz_mini/etc/rc.d/S20cron
|
282e4e0ce3be2740403466bea0c380d9 SD_ROOT/wz_mini/etc/rc.d/S20cron
|
||||||
22b999594f237453f821b68248b34156 SD_ROOT/wz_mini/etc/rc.d/S13mp4write
|
c64a9651df819401b04708736c29cf30 SD_ROOT/wz_mini/etc/rc.d/S13mp4write
|
||||||
769776b26247d680ca564c9af3288c91 SD_ROOT/wz_mini/etc/rc.d/S05rndis
|
28ddd36f07b39500630eccd16d9938aa SD_ROOT/wz_mini/etc/rc.d/S05rndis
|
||||||
19ff129af984cf133c92e9c524dda401 SD_ROOT/wz_mini/etc/rc.d/S01swap
|
8cd393bb2cda585061961dba143ae2bd SD_ROOT/wz_mini/etc/rc.d/S01swap
|
||||||
bbccf00adaf0b2494a98f18769e10a0f SD_ROOT/wz_mini/etc/rc.d/K15logging
|
17ab0c2db34671e4dcc05cc4e6b440ee SD_ROOT/wz_mini/etc/rc.d/K15logging
|
||||||
0b8a842db49b2fd5c9b1e24ebcb507fd SD_ROOT/wz_mini/etc/rc.d/S21syslog
|
55dfb3a95dec09663df5ae9da8e7a602 SD_ROOT/wz_mini/etc/rc.d/S21syslog
|
||||||
69840400ee805665a3a4913003cf60db SD_ROOT/wz_mini/etc/rc.d/S04usbdirect
|
e76b57b067bc349fd3e977447b0316f4 SD_ROOT/wz_mini/etc/rc.d/S04usbdirect
|
||||||
093ae35263b39668da01bee03e81cbe9 SD_ROOT/wz_mini/etc/rc.d/S09coredump
|
70e289c992f46d69954f72b7550b9876 SD_ROOT/wz_mini/etc/rc.d/S09coredump
|
||||||
9e5591da95042bcca910403bde25dc60 SD_ROOT/wz_mini/etc/fstab
|
9e5591da95042bcca910403bde25dc60 SD_ROOT/wz_mini/etc/fstab
|
||||||
3962900301ef8743c68e42ecef4d2811 SD_ROOT/wz_mini/etc/passwd
|
3962900301ef8743c68e42ecef4d2811 SD_ROOT/wz_mini/etc/passwd
|
||||||
775b92a2052189e3e407cbceb548cae7 SD_ROOT/wz_mini/etc/rc.local
|
775b92a2052189e3e407cbceb548cae7 SD_ROOT/wz_mini/etc/rc.local
|
||||||
@ -127,7 +127,7 @@ e6a6a9dd8ce138686083a3d4303cea40 SD_ROOT/wz_mini/bin/iperf3
|
|||||||
79d69cd251a8cdadd9957cdaec2034fc SD_ROOT/wz_mini/bin/rtmp-stream.sh
|
79d69cd251a8cdadd9957cdaec2034fc SD_ROOT/wz_mini/bin/rtmp-stream.sh
|
||||||
5d1359af0c7c5d326b8682a62f910620 SD_ROOT/wz_mini/bin/strace
|
5d1359af0c7c5d326b8682a62f910620 SD_ROOT/wz_mini/bin/strace
|
||||||
516118bfcc0f0ddc93fb9339b3c6a315 SD_ROOT/wz_mini/bin/xtables-multi
|
516118bfcc0f0ddc93fb9339b3c6a315 SD_ROOT/wz_mini/bin/xtables-multi
|
||||||
9be9aab45620d83fecc8b963954cf4f1 SD_ROOT/wz_mini/bin/gather_wz_logs.sh
|
ba7475184c364fee8bba1f45b7c42070 SD_ROOT/wz_mini/bin/gather_wz_logs.sh
|
||||||
097cd91a56f2b0caea1dd87ae0e51a54 SD_ROOT/wz_mini/bin/screen
|
097cd91a56f2b0caea1dd87ae0e51a54 SD_ROOT/wz_mini/bin/screen
|
||||||
fbbc2a8f362d05fc31557b1a534b42c6 SD_ROOT/wz_mini/bin/wget
|
fbbc2a8f362d05fc31557b1a534b42c6 SD_ROOT/wz_mini/bin/wget
|
||||||
35420095a770c9bb6177788842f55bba SD_ROOT/wz_mini/bin/dropbearconvert
|
35420095a770c9bb6177788842f55bba SD_ROOT/wz_mini/bin/dropbearconvert
|
||||||
@ -152,9 +152,9 @@ ac9f3a5d097d25d5d972c3d2ad288df9 SD_ROOT/wz_mini/usr/bin/ucamera_v2
|
|||||||
1e64fdad40c82ecce420f71701ec3d6d SD_ROOT/wz_mini/usr/bin/watch_up.sh
|
1e64fdad40c82ecce420f71701ec3d6d SD_ROOT/wz_mini/usr/bin/watch_up.sh
|
||||||
b339aee882a5d1c943ad08e4282ec3fd SD_ROOT/wz_mini/usr/bin/iCamera-dbg
|
b339aee882a5d1c943ad08e4282ec3fd SD_ROOT/wz_mini/usr/bin/iCamera-dbg
|
||||||
20b061689308b2cee7edf3b9b906bca7 SD_ROOT/wz_mini/usr/bin/ucamera
|
20b061689308b2cee7edf3b9b906bca7 SD_ROOT/wz_mini/usr/bin/ucamera
|
||||||
665690dd52c5398857142292c0c22742 SD_ROOT/wz_mini/usr/bin/imp_helper.sh
|
3e15a736b79854c35abb7fd4f7207064 SD_ROOT/wz_mini/usr/bin/imp_helper.sh
|
||||||
580b1b6e91e72b4a4fef7b21d8954403 SD_ROOT/wz_mini/usr/bin/getSensorType
|
580b1b6e91e72b4a4fef7b21d8954403 SD_ROOT/wz_mini/usr/bin/getSensorType
|
||||||
62059fad6d14d560f65b5bdbd1fd183b SD_ROOT/wz_mini/usr/bin/app.ver
|
c78716b683ce1d2b180bfbfcfc02df42 SD_ROOT/wz_mini/usr/bin/app.ver
|
||||||
4c780f0455481d106d47d89f0ae04ed5 SD_ROOT/wz_mini/lib/uClibc.tar
|
4c780f0455481d106d47d89f0ae04ed5 SD_ROOT/wz_mini/lib/uClibc.tar
|
||||||
9afeb088e4cbabbe0b04033b560204d0 SD_ROOT/wz_mini/lib/libimp.so
|
9afeb088e4cbabbe0b04033b560204d0 SD_ROOT/wz_mini/lib/libimp.so
|
||||||
4100755cb6cc6e3b76da20c7e3690e16 SD_ROOT/wz_mini/lib/libalog.so
|
4100755cb6cc6e3b76da20c7e3690e16 SD_ROOT/wz_mini/lib/libalog.so
|
||||||
|
Loading…
Reference in New Issue
Block a user