Ver código fonte

fix custom hostname issues

Alfonso Gamboa 3 anos atrás
pai
commit
e5fc16696d

+ 3 - 2
README.md

@@ -69,7 +69,7 @@ Using this project can potentially expose your device to the open internet depen
 ## Setup v3/PANv2
 
 1. git clone the repo or download the repo zip
-2. format micro-sd card as fat-32 ( this is a hard requirement, the bootloader does not support ex-fat or ext, and thus will not load wz_mini ), DOS partition map type, volume name does not matter.
+2. perform a fresh format on your micro-sd card, using fat-32 ( this is a hard requirement, the bootloader does not support ex-fat or ext, and thus will not load wz_mini ), DOS partition map type, volume name does not matter.
 3. copy all the files inside of SD_ROOT to your micro sd card
 4. __SSH is enabled, but is secured using public key authentication for security.  Edit the file ```wz_mini/etc/ssh/authorized_keys``` and enter your public key here.  If you need a simple guide, [how to use public key authentication](https://averagelinuxuser.com/how-to-use-public-key-authentication/)__
 
@@ -84,7 +84,7 @@ Using this project can potentially expose your device to the open internet depen
 ## Setup v2
 
 1. git clone the repo or download the repo zip
-2. format micro-sd card as fat-32 ( this is a hard requirement, the bootloader does not support ex-fat or ext, and thus will not load wz_mini ), DOS partition map type, volume name does not matter.
+2. perform a fresh format on your micro-sd card, using fat-32 ( this is a hard requirement, the bootloader does not support ex-fat or ext, and thus will not load wz_mini ), DOS partition map type, volume name does not matter.
 3. Run `compile_image.sh` using linux, wait for the script to finish.
 4. Copy all the files inside of SD_ROOT to your micro sd card
 5. Copy the generated `demo.bin` to root of your micro sd card
@@ -381,6 +381,7 @@ NOTE: if you are upgrading a V2 camera from a release older than 06-16-22, you m
 
 ## Latest Updates
 
+* 06-17-22:  Fix custom hostname not being set.  Note: The hostname variable has CHANGED!  You will need to update your `wz_mini.conf` file.
 * 06-16-22:  Simplified the camera model detection method throughout wz_mini.
 * 06-16-22:  fix scp client bug, allow user modifications to app_init, updated initramfs script, moved upgrade-run to PATH, revised kernel module paths, added ENABLE_RTL8189FS_DRIVER option for v2/v3, updated kernels for v2/v3. ( NOTE: this is a major upgrade, file names for the init scripts have changed, if you are upgrading the V2, do not use the upgrade-run.sh script, please manually update )
 * 06-14-22:  Updated v4l2rtspserver, fixes to prevent rare low memory situations and RTSP server crashes, fixed intermittant failed RTSP HD stream, script logic updates.

+ 3 - 3
SD_ROOT/wz_mini/etc/init.d/wz_user.sh

@@ -29,7 +29,7 @@ export WZMINI_CFG=/opt/wz_mini/wz_mini.conf
 
 hostname_set() {
 	echo "set hostname"
-	hostname $HOSTNAME
+	hostname $CUSTOM_HOSTNAME
 }
 
 first_run_check() {
@@ -75,7 +75,7 @@ eth_wlan_up() {
 ##Run DHCP client, and bind mount our fake wpa_cli.sh to fool iCamera
         ifconfig wlan0 up
 	pkill udhcpc
-        udhcpc -i wlan0 -x hostname:$HOSTNAME -p /var/run/udhcpc.pid -b
+        udhcpc -i wlan0 -x hostname:$CUSTOM_HOSTNAME -p /var/run/udhcpc.pid -b
 	if [ -f /opt/wz_mini/tmp/.T20 ]; then
         mount -o bind /opt/wz_mini/bin/wpa_cli.sh /system/bin/wpa_cli
 	else
@@ -233,7 +233,7 @@ fi
 
 if [[ "$ENABLE_USB_DIRECT" == "true" ]]; then
 
-        HOST_MACADDR=$(echo "$HOSTNAME"|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/')
+        HOST_MACADDR=$(echo "$CUSTOM_HOSTNAME"|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/')
 
         if [ -f /opt/wz_mini/tmp/.T20 ]; then
 		echo connect > /sys/devices/platform/jz-dwc2/dwc2/udc/dwc2/soft_connect

+ 3 - 1
SD_ROOT/wz_mini/etc/wz_mini.conf.dist

@@ -9,7 +9,7 @@ WEB_CAM_BIT_RATE="8000"
 WEB_CAM_FPS_RATE="25"
 
 #####NETWORKING#####
-HOSTNAME="WCV3"
+CUSTOM_HOSTNAME="WCV3"
 
 ENABLE_USB_ETH="false"
 ENABLE_USB_ETH_MODULES="asix"
@@ -32,6 +32,8 @@ ENABLE_IPTABLES="false"
 
 ENABLE_NFSv4="false"
 
+ENABLE_RTL8189FS_DRIVER="false"
+
 #####ACCESSORIES#####
 REMOTE_SPOTLIGHT="false"
 REMOTE_SPOTLIGHT_HOST="0.0.0.0"

+ 1 - 1
SD_ROOT/wz_mini/wz_mini.conf

@@ -9,7 +9,7 @@ WEB_CAM_BIT_RATE="8000"
 WEB_CAM_FPS_RATE="25"
 
 #####NETWORKING#####
-HOSTNAME="WCV3"
+CUSTOM_HOSTNAME="WCV3"
 
 ENABLE_USB_ETH="false"
 ENABLE_USB_ETH_MODULES="asix"

+ 5 - 5
file.chk

@@ -3,11 +3,11 @@ d41d8cd98f00b204e9800998ecf8427e  SD_ROOT/wz_mini/mnt/.gitignore
 34c6a4c3a941ff2becd9f487826d7692  SD_ROOT/wz_mini/etc/uvc.config
 ad7d1a2f9db3079617731b5854ce3b6a  SD_ROOT/wz_mini/etc/init.d/wz_cam.sh
 0774518c06d6ef8e7181d35f194777cc  SD_ROOT/wz_mini/etc/init.d/wz_init.sh
-f4e8ec1b1d69c3b5ba74c617ec7e73d0  SD_ROOT/wz_mini/etc/init.d/wz_user.sh
+c94845a6a1bd6c20f643daf4595b03f9  SD_ROOT/wz_mini/etc/init.d/wz_user.sh
 48c4fd27a194459efda6e92b446f51a0  SD_ROOT/wz_mini/etc/init.d/wz_post.sh
 e3034eac02d8eda9902ca9cf89f0a586  SD_ROOT/wz_mini/etc/inittab
 840aa9c26726201f7cffbf001bee193a  SD_ROOT/wz_mini/etc/uvc_jxf22.config
-2e2d5c1ebdcc16da6852e9cdd3ffc66c  SD_ROOT/wz_mini/etc/wz_mini.conf.dist
+2609cae8b3b084d83e84299528d8bc93  SD_ROOT/wz_mini/etc/wz_mini.conf.dist
 8b5e58acfcbb20034dc4873a08b45fd9  SD_ROOT/wz_mini/etc/profile
 2c2df1b9cb603f9c31c46162d6ac307f  SD_ROOT/wz_mini/etc/alsa/alsa.conf
 9e5591da95042bcca910403bde25dc60  SD_ROOT/wz_mini/etc/fstab
@@ -25,7 +25,7 @@ d41d8cd98f00b204e9800998ecf8427e  SD_ROOT/wz_mini/root/.gitignore
 ec906872794379af570869ebfd49bb23  SD_ROOT/wz_mini/bin/tcpdump
 db5c63af3c763fc6eb76f6e1b5c96794  SD_ROOT/wz_mini/bin/file
 3feb341fca58bc705c3ed5705d4eb716  SD_ROOT/wz_mini/bin/factorycheck
-fa09ee51c0aa8e9a5896051c20238965  SD_ROOT/wz_mini/bin/cmd
+042c34e28f96300c402a08254dca1200  SD_ROOT/wz_mini/bin/cmd
 a9a6bf805cbcfdd6698fe5efd65f91bb  SD_ROOT/wz_mini/bin/nano
 36cbfe7b96d4240a6b138dd3695ccefd  SD_ROOT/wz_mini/bin/strings
 1458f09775917db388f807f7ac01bb65  SD_ROOT/wz_mini/bin/socat
@@ -55,7 +55,7 @@ e6a6a9dd8ce138686083a3d4303cea40  SD_ROOT/wz_mini/bin/iperf3
 65510c6c4d0db4b4679fc92d1c617fdd  SD_ROOT/wz_mini/bin/rtmp-stream.sh
 5d1359af0c7c5d326b8682a62f910620  SD_ROOT/wz_mini/bin/strace
 516118bfcc0f0ddc93fb9339b3c6a315  SD_ROOT/wz_mini/bin/xtables-multi
-a97ef595ae543e76de900c270baaa0d9  SD_ROOT/wz_mini/bin/gather_wz_logs.sh
+17a23742c599a262e4144c499fa66845  SD_ROOT/wz_mini/bin/gather_wz_logs.sh
 097cd91a56f2b0caea1dd87ae0e51a54  SD_ROOT/wz_mini/bin/screen
 fbbc2a8f362d05fc31557b1a534b42c6  SD_ROOT/wz_mini/bin/wget
 35420095a770c9bb6177788842f55bba  SD_ROOT/wz_mini/bin/dropbearconvert
@@ -184,5 +184,5 @@ ccf8f3611141656ba5594771bec06202  SD_ROOT/wz_mini/lib/modules/3.10.14__isvp_swan
 14865a6e2e2df87a8362c6f20377a934  SD_ROOT/wz_mini/lib/libtinyalsa.so.2
 bd383994491e4bdca81788c168feb2eb  SD_ROOT/wz_mini/lib/libasound.so.2
 f6f0d5a9ebd916de6bdb9695067809ae  SD_ROOT/wz_mini/lib/libaudioProcess.so
-2d825fabc13b2f654c26c492758e1c8e  SD_ROOT/wz_mini/wz_mini.conf
+2609cae8b3b084d83e84299528d8bc93  SD_ROOT/wz_mini/wz_mini.conf
 d41d8cd98f00b204e9800998ecf8427e  SD_ROOT/wz_mini/tmp/.gitignore