Posted: Tue May 07, 2019 1:05 Post subject: Optware: Duplicate UI elements when bind mounting /jffs/etc
In order to use Optware packages for some custom kid internet controls that I scripted to run on my router (Alexa + IFFTT + JSON web service), I have to have a writeable /etc, /bin, etc. directories. In order to accomplish this, I do the seemingly recommended steps of copying /etc/* to /jffs/etc/ as part of my USB flash drive mounting script:
/bin/cp -fa /etc/* /jffs/etc/
/bin/cp -fa /bin/* /jffs/bin/
/bin/cp -fa /lib/* /jffs/lib/
/bin/cp -fa /usr/* /jffs/usr/
/bin/mount -o bind /jffs/etc /etc
/bin/mount -o bind /jffs/bin /bin
/bin/mount -o bind /jffs/lib /lib
/bin/mount -o bind /jffs/usr /usr
While everything works as normal on the router, the one problem that I have is that the web GUI has duplicate UI elements. It seems that having the /etc/www file in both /etc and /jffs/etc causes the "Services/Services" and "Administration/Management" tabs to have the same UI config elements repeated 2x. Any edits done on the page when it's displayed in this manner causes unexpected problems in the nvram as well (typically empties out settings, breaking my config).
I've found that I have to unmount the USB disk and remove it before I can make config changes on these two pages.
I've searched high and low and it doesn't seem like anyone else has run into this issue.
Mounting was done via a startup script. I never had the copy lines in there though. I only ever removed the drive when upgrading DD-WRT and then copy the etc folder over manually, in particular the www folder.