roleoroleo / sonoff-hack

Custom firmware for Sonoff GK-200MP2B camera
GNU General Public License v3.0
200 stars 45 forks source link

A few more minor fixes #114

Closed darkxst closed 1 year ago

darkxst commented 1 year ago
roleoroleo commented 1 year ago

This mount command: mount --bind /var/sdcard/log /var/log refers to a path where sd card is mounted temporarily. The final path is /mnt/mmc

Are you sure it's working?

darkxst commented 1 year ago

Yes it is working.

/mnt/mmc is not avilable that early in boot. However the bind mount remains in place after boot.

/dev/mmcblk0p1 on /var/log type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

roleoroleo commented 1 year ago

About /etc/profile, why didn't you put

/mnt/mmc/sonoff-hack/bin
/mnt/mmc/sonoff-hack/sbin
/mnt/mmc/sonoff-hack/usr/bin
/mnt/mmc/sonoff-hack/usr/sbin

in the PATH as well?

darkxst commented 1 year ago

PATH is set in Dropbear per below. What is in /etc/profile is really just a fail-safe in case something goes wrong and no PATH is set. It wont be set there normally apart from maybe in a telnet login?

#define DEFAULT_ROOT_PATH "/usr/bin:/usr/sbin:/bin:/sbin:/gm/bin:/gm/tools:/mnt/mmc/sonoff-hack/bin:/mnt/mmc/sonoff-hack/sbin:/mnt/mmc/sonoff-hack/usr/bin:/mnt/mmc/sonoff-hack/usr/sbin"

darkxst commented 1 year ago

@roleoroleo I have updated the fallback PATH in /etc/profile to match the non-root default PATH from Dropbear. All root logins via ssh will get the proper PATH already via Dropbear, thus ignoring what is in /etc/profile for PATH setting anyway.

edit: I'd probably suggest pushing out the 0.1.4 release after this is merged. Whenever you have time for that of course ;)

roleoroleo commented 1 year ago

Thanks.