HclX / WyzeHacks

Hacks I discovered allowing Wyze camera owners to do customizations
MIT License
786 stars 75 forks source link

replacing df with ls for nfs check #130

Closed pygmymarmoset closed 2 years ago

pygmymarmoset commented 3 years ago

The check_nfs df breaks and exits 1 on large nfs shares and causes the camera to keep rebooting.

[root@WyzeCam-C428:~]# df || echo broken 
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 3712      3712         0 100% /
tmpfs                    45736       652     45084   1% /dev
tmpfs                    45736       940     44796   2% /tmp
tmpfs                    45736         8     45728   0% /run
media                    45736         0     45736   0% /media
/dev/mtdblock3            3584      3584         0 100% /system
/dev/mtdblock6             384       120       264  31% /configs
df: /mnt: Value too large for defined data type
df: /media/mmcblk0p1: Value too large for defined data type
broken
[root@WyzeCam-C428:~]#

Using ls should provide the same functionality (verifying nfs is working), and works correctly in my testing (shut down nfs server and it failed as expected).