yi-hack-v5 icon indicating copy to clipboard operation
yi-hack-v5 copied to clipboard

get_config shall not be used before the function is defined.

Open ViktorSchlaffer opened this issue 3 years ago • 1 comments

Hi,

The get_config function in wd_rtsp.sh should be moved to the beginning of the script, it should not be referenced (in line 15/16) before it's defined:

/home/yi-hack-v5 # sh -x ./script/wd_rtsp.sh
+ CONF_FILE=etc/system.conf
+ YI_HACK_PREFIX=/tmp/sd/yi-hack-v5
+ cat /home/app/.camver
+ MODEL_SUFFIX=yi_outdoor
+ LOG_FILE=/tmp/sd/wd_rtsp.log
+ COUNTER=0
+ COUNTER_LIMIT=10
+ INTERVAL=10
+ get_config RTSP_STREAM
./script/wd_rtsp.sh: line 15: get_config: not found
+ RRTSP_RES=
+ get_config RTSP_AUDIO
./script/wd_rtsp.sh: line 16: get_config: not found
+ RRTSP_AUDIO=
...

https://github.com/alienatedsec/yi-hack-v5/blob/60c5213173bc228e02b7cf3d056733dc6000225b/src/static/static/home/yi-hack-v5/script/wd_rtsp.sh#L22

ViktorSchlaffer avatar Feb 13 '22 19:02 ViktorSchlaffer

@ViktorSchlaffer your issue is valid but the problem is that this script is currently disabled: https://github.com/alienatedsec/yi-hack-v5/blame/master/src/static/static/home/yi-hack-v5/script/system.sh#L240 (probably because of that issue).

dawidmalina avatar Feb 15 '22 22:02 dawidmalina