Optware: Duplicate UI elements when bind mounting /jffs/etc

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
foobarfoo
DD-WRT Novice


Joined: 12 Sep 2008
Posts: 26

PostPosted: Tue May 07, 2019 1:05    Post subject: Optware: Duplicate UI elements when bind mounting /jffs/etc Reply with quote
Hi All,

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.

Thanks!
Sponsor
foobarfoo
DD-WRT Novice


Joined: 12 Sep 2008
Posts: 26

PostPosted: Tue May 07, 2019 1:30    Post subject: Reply with quote
eibgrad wrote:
I have to say, I've never seen anyone who needed to bind that many folders on the router. In a way, I'm not surprised it's leading to problems.


It's only /etc that causes problems, and only with the www file. Even if I run "/bin/rm /jffs/etc/www" before I do the bind mount of /etc, I still get the duplicate UI problem.
foobarfoo
DD-WRT Novice


Joined: 12 Sep 2008
Posts: 26

PostPosted: Tue May 07, 2019 3:40    Post subject: Reply with quote
foobarfoo wrote:
It's only /etc that causes problems, and only with the www file. Even if I run "/bin/rm /jffs/etc/www" before I do the bind mount of /etc, I still get the duplicate UI problem.


As a test, I removed all other copies of the "www" file from the USB file system, disabled the "cp -fa ..." command in my mount script and rebooted.

Whenever the /etc/ directory is bind-mounted, the UI doubling issue is there. I really don't understand how though.
ian5142
DD-WRT Guru


Joined: 23 Oct 2013
Posts: 2319
Location: Canada

PostPosted: Tue May 07, 2019 20:00    Post subject: Entware Reply with quote
I used Entware in the past. https://wiki.dd-wrt.com/wiki/index.php/Installing_Entware

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.

I have never run into this issue.

_________________
Before asking a question on the forums, update dd-wrt: Where do I download firmware? I suggest reading it all.
QCA Best WiFi Settings


Some dd-wrt wiki pages are up to date, others are not. PM me if you find an old one.

Atheros:
Netgear R7800 x3 - WDS AP / station, gateway, QoS
TP-Link Archer C7 v2 x2 - WDS Station
TP-Link TL-WDR3600 v1 - WDS Station
TP-Link 841nd v8 - NU
D-Link 615 C1/E3/I1 x 7 - 1 WDS station
D-Link 825 B1 - NU
D-Link 862L A1 x2 - WDS Station
Netgear WNDR3700v2 - NU
UBNT loco M2 x2 - airOS

Broadcom
Linksys EA6400 - Gateway, QoS
Asus N66U - AP
Netgear WNDR3700v3 - not used
MediaTek
UBNT EdgeRouter X - switch
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum