New Build 42287: 02-06-2020-r42287

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3
Author Message
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1020
Location: Hung Hom, Hong Kong

PostPosted: Sun Feb 09, 2020 10:23    Post subject: Reply with quote
BrainSlayer wrote:
sounds like you configured wrong paths

Or maybe the USB drives were mounted with different paths...


_________________
Router: Asus RT-N18U (rev. A1)

May the Force and farces be with you! Live long and prosper!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
Sponsor
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1020
Location: Hung Hom, Hong Kong

PostPosted: Sun Feb 09, 2020 10:37    Post subject: DD-WRT BS build 42287 and Asus RT-N Reply with quote
Router/Version: Asus RT-N18U(rev. A1)
Firmware: DD-WRT v3.0-r42287 std (02/06/20)
Kernel: inux 4.4.213 #871 Thu Feb 6 21:50:38 +04 2020 armv7l
Previous: DD-WRT v3.0-r42174 std (01/30/20)
Mode: WAN @ DHCP, Wireless @ AP
Status: Working (Not 24/7; Not using IPv6, VAP, VPN; Using NAS & USB)
Reset: NO reset during firmware upgrade but cold boot

Quick Notes

1. Some strange Samba (smbd/wsdd) messages. See logs!
2. Is usmbd supposed to be replaced by ksmbd? Then it should have disppeared from the logs?


System Log

Error(s): grep -i err /var/log/messages
Code:

Jan  1 08:00:13 RT-N18U kern.err kernel: bcmsflash: found no supported devices
Jan  1 08:00:13 RT-N18U daemon.info mstpd[596]: error, CTL_set_cist_bridge_config: Couldn't find bridge with index 7
Jan  1 08:00:13 RT-N18U daemon.info mstpd[596]: error, CTL_set_cist_bridge_config: Couldn't find bridge with index 7
Jan  1 08:00:22 RT-N18U user.err wsdd2[971]: error: wsdd-mcast-v4: wsd_send_soap_msg: send
Jan  1 08:00:22 RT-N18U local5.err usmbd: [usmbd-worker/975]: ERROR: Can't open `/tmp/smb.db': No such file or directory
Jan  1 08:00:22 RT-N18U local5.err usmbd: [usmbd-worker/975]: ERROR: User database file does not exist. Only guest sessions (if permitted) will work.
Jan  1 08:00:23 RT-N18U user.err wsdd2[971]: error: wsdd-mcast-v4: wsd_send_soap_msg: send
Jan  1 08:00:23 RT-N18U user.err wsdd2[971]: error: wsdd-mcast-v4: wsd_send_soap_msg: send
Feb  9 18:19:57 RT-N18U user.err wsdd2[971]: error: wsdd-mcast-v4: wsd_send_soap_msg: send
Feb  9 18:19:57 RT-N18U user.err wsdd2[971]: error: wsdd-mcast-v4: wsd_send_soap_msg: send
Feb  9 18:19:57 RT-N18U user.err wsdd2[971]: error: wsdd-mcast-v4: wsd_send_soap_msg: send
Feb  9 18:20:02 RT-N18U kern.err kernel: hub 3-0:1.0: config failed, hub doesn't have any ports! (err -19)
Feb  9 18:20:04 RT-N18U user.err wsdd2[971]: Terminated received.
Feb  9 18:20:04 RT-N18U local5.err usmbd: [usmbd-manager/974]: ERROR: WARNING: child process exited abnormally: 975
Feb  9 18:20:10 RT-N18U local5.err usmbd: [usmbd-worker/1631]: ERROR: Can't open `/tmp/smb.db': No such file or directory
Feb  9 18:20:10 RT-N18U local5.err usmbd: [usmbd-worker/1631]: ERROR: User database file does not exist. Only guest sessions (if permitted) will work.
Feb  9 18:24:45 RT-N18U daemon.err httpd[1360]: httpd : Request Error Code 404: File style/elegant/logo.png not found.
Feb  9 18:24:47 RT-N18U daemon.err httpd[1360]: httpd : Request Error Code 401: Authorization required. please note that the default username is "root" in all newer releases


Warning(s): grep -i warn /var/log/messages | grep -v DROP
Code:

Feb  9 18:20:01 RT-N18U daemon.warn dnsmasq[1234]: possible DNS-rebind attack detected: tracker.publicbt.com
Feb  9 18:20:04 RT-N18U local5.err usmbd: [usmbd-manager/974]: ERROR: WARNING: child process exited abnormally: 975
Feb  9 18:20:08 RT-N18U kern.warn kernel: EXT4-fs (sda1): Ignoring removed nobh option


Firmware Size

From 30515200 (b.31277) to 24711168 (b.33555) = -5804032 bytes
From 24711168 (b.33555) to 27054080 (b.34929) = 2342912 bytes
From 27054080 (b.34929) to 26640384 (b.35531) = -413696 bytes
From 26640384 (b.35531) to 25022464 (b.36995) = -1617920 bytes
From 25022464 (b.36995) to 25427968 (b.37961) = 405504 bytes
From 25427968 (b.37961) to 25804800 (b.38570) = 376832 bytes
From 25804800 (b.38570) to 27574272 (b.38840) = 1769472 bytes
From 27574272 (b.38840) to 27774976 (b.39031) = 200704 bytes
From 27774976 (b.39031) to 27779072 (b.39137) = 4096 bytes
From 27779072 (b.39137) to 27779072 (b.39144) = 0 byte
From 27779072 (b.39144) to 28672000 (b.39267) = 892928 bytes
From 28672000 (b.39267) to 27926528 (b.39296) = -745472 bytes
From 27926528 (b.39296) to 27918336 (b.39494) = -8192 bytes
From 27918336 (b.39494) to 27918336 (b.39508) = 0 byte
From 27918336 (b.39508) to 28147712 (b.39572) = 229376 bytes
From 28147712 (b.39572) to 28151808 (b.39654) = 4096 bytes
From 28151808 (b.39654) to 28151808 (b.39715) = 0 byte
From 28151808 (b.39715) to 27938816 (b.39800) = -212992 bytes
From 27938816 (b.39800) to 27938816 (b.39884) = 0 byte
From 27938816 (b.39884) to 27942912 (b.39944) = 4096 bytes
From 27942912 (b.39944) to 28024832 (b.40065) = 81920 bytes
From 28024832 (b.40065) to 28479488 (b.40459) = 454656 bytes
From 28479488 (b.40459) to 28749824 (b.40900) = 270336 bytes
From 28749824 (b.40900) to 27856896 (b.41174) = -892928 bytes
From 27856896 (b.41174) to 27873280 (b.41686) = 16384 bytes
From 27873280 (b.41686) to 26804224 (b.42015) = -1069056 bytes
From 26804224 (b.42015) to 26832896 (b.42054) = 28672 bytes
From 26832896 (b.42054) to 26980352 (b.42174) = 147456 bytes
From 26980352 (b.42174) to 26988544 (b.42287) = 8192 bytes


_________________
Router: Asus RT-N18U (rev. A1)

May the Force and farces be with you! Live long and prosper!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 10127
Location: Netherlands

PostPosted: Sun Feb 09, 2020 13:41    Post subject: Reply with quote
The new in kernel Samba was first called cifsd then usmbd and the new name is ksmbd (in between it also was smbd but that was really confusing Sad )
_________________
Routers:Netgear R7800, R6400v1, R6400v2, Linksys EA8500, EA6900 (XvortexCFE), E2000 (converted WRT320N), WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1020
Location: Hung Hom, Hong Kong

PostPosted: Sun Feb 09, 2020 17:35    Post subject: Reply with quote
egc wrote:
The new in kernel Samba was first called cifsd then usmbd and the new name is ksmbd (in between it also was smbd but that was really confusing Sad )


I wish it's just an error in init scripts not being updated. Or maybe the header file for ksmbd was not yet updated and still using the old name?

We'll see in the next build? Smile


_________________
Router: Asus RT-N18U (rev. A1)

May the Force and farces be with you! Live long and prosper!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
Wookie104
Guest





PostPosted: Sun Feb 09, 2020 20:11    Post subject: Reply with quote
Router buffalo wzr-dhp2
Reset - Yes

I use this for a minidlna server

Issues with Samba
Jan 1 01:19:57 DD-WRT local5.err usmbd: [usmbd-worker/3353]: ERROR: Can't open `/tmp/smb.db': No such file or directory
Jan 1 01:19:57 DD-WRT local5.err usmbd: [usmbd-worker/3353]: ERROR: User database file does not exist. Only guest sessions (if permitted) will work.
Jan 1 01:20:43 DD-WRT user.err : Caught SIGSEGV (11) in ???
Jan 1 01:20:43 DD-WRT user.err : Fault at memory location 0x00000000 due to address not mapped to object (1).
Jan 1 01:20:43 DD-WRT user.err : Thread 3399: ksmbd.mountd
Jan 1 01:20:43 DD-WRT user.err : === Context:
Jan 1 01:20:43 DD-WRT user.err : TRAPNO:0000000e ERRCODE:00000017 OLDMASK:00000000 R0:76e4d8c0
Jan 1 01:20:43 DD-WRT user.err : R1:00000000 R2:00000003 R3:0001b95c R4:76e4d8c0
Jan 1 01:20:43 DD-WRT user.err : R5:00000000 R6:76e4d6c0 R7:00000000 R8:76e4d8c0
Jan 1 01:20:43 DD-WRT user.err : R9:00000000 R10:00000000 FP:00000000 IP:00031144
Jan 1 01:20:43 DD-WRT user.err : SP:76e1ac78 LR:0001ce0c PC:0001b964 CPSR:60000010
Jan 1 01:20:43 DD-WRT user.err : FAULTADDR:00000000
Jan 1 01:20:43 DD-WRT user.err : === Backtrace:
Jan 1 01:20:43 DD-WRT user.err : # Searching frame 0 (FP=0x00000000, PC=0x0001b964)
Jan 1 01:20:43 DD-WRT user.err : # PC-167c[0x0001a2e8]: 0xe92d4ff0 stmfd sp!
Jan 1 01:20:43 DD-WRT user.err : # Stack at 0x00000000 is not mapped; terminating backtrace.
Jan 1 01:20:43 DD-WRT user.err : /usr/sbin/ksmbd.mountd[0x00010000](+0x0000b964)[0x0001b964]
Jan 1 01:20:43 DD-WRT user.err : === Code:
Jan 1 01:20:43 DD-WRT user.err : 0001b924: e1a00008 e1a03007 ebfff2fb e5943004 e1a00005 e2433001 e5843004 e5943008
Jan 1 01:20:43 DD-WRT user.err : 0001b944: e2833001 e5843008 ebfff75d e3a00000 e28dd008 e8bd81f0 e92d4070 e1a05001
Jan 1 01:20:43 DD-WRT user.err : 0001b964: >e5910000 ebffd8fe e1a04080 e595008c e3500000 0a000001 ebffd8f9 e0844080
Jan 1 01:20:43 DD-WRT user.err : 0001b984: e2840024 e8bd8070 e5910000 e92d4010 ebffd8f3 e2800008 e1a00080 e8bd8010
Jan 1 01:20:43 DD-WRT local5.err usmbd: [usmbd-manager/3352]: ERROR: WARNING: child process exited abnormally: 3353
Jan 1 01:20:44 DD-WRT local5.err usmbd: [usmbd-worker/3401]: ERROR: Can't open `/tmp/smb.db': No such file or directory
Jan 1 01:20:44 DD-WRT local5.err usmbd: [usmbd-worker/3401]: ERROR: User database file does not exist. Only guest sessions (if permitted) will work.
Jan 1 01:20:45 DD-WRT local5.err usmbd: [usmbd-worker/3401]: ERROR: RPC: unknown pipe ID: 0
Jan 1 01:21:29 DD-WRT user.info : wsdd2 : windows service discovery daemon successfully stopped
Jan 1 01:21:29 DD-WRT user.err wsdd2[3349]: Terminated received.
Jan 1 01:21:29 DD-WRT user.info wsdd2[3349]: terminating.
Jan 1 01:21:29 DD-WRT user.info : ksmbd.mountd : samba daemon successfully stopped
Jan 1 01:21:29 DD-WRT local5.err usmbd: [usmbd-manager/3352]: ERROR: WARNING: child process exited abnormally: 3401
Jan 1 01:21:31 DD-WRT user.info wsdd2[3600]: starting.
Jan 1 01:21:31 DD-WRT user.info : smbd : samba started
Jan 1 01:21:31 DD-WRT local5.info usmbd: [usmbd-manager/3603]: INFO: Unlink orphaned '/tmp/usmbd.lock'
Jan 1 01:21:31 DD-WRT local5.err usmbd: [usmbd-worker/3604]: ERROR: Can't open `/tmp/smb.db': No such file or directory
Jan 1 01:21:31 DD-WRT local5.err usmbd: [usmbd-worker/3604]: ERROR: User database file does not exist. Only guest sessions (if permitted) will work.
Jan 1 01:21:31 DD-WRT local5.err usmbd: [usmbd-worker/3604]: ERROR: Recv() error Invalid input data or parameter [-7]
Jan 1 01:21:31 DD-WRT local5.err usmbd: [usmbd-manager/3603]: ERROR: WARNING: child process exited abnormally: 3604
Jan 1 01:21:31 DD-WRT local5.err usmbd: [usmbd-manager/3603]: ERROR: Fatal IPC error. Terminating. Check dmesg.
Jan 1 01:22:16 DD-WRT user.info : wsdd2 : windows service discovery daemon successfully stopped
Jan 1 01:22:16 DD-WRT user.err wsdd2[3600]: Terminated received.
Jan 1 01:22:16 DD-WRT user.info wsdd2[3600]: terminating.
Jan 1 01:22:18 DD-WRT user.info wsdd2[3803]: starting.
Jan 1 01:22:18 DD-WRT user.info : smbd : samba started
RhodWulf
DD-WRT Novice


Joined: 05 Feb 2017
Posts: 9
Location: Buenos Aires, Argentina

PostPosted: Sun Feb 09, 2020 21:01    Post subject: Reply with quote
BrainSlayer wrote:
RhodWulf wrote:
Router/Version: Linksys EA6200
Mode: Gateway/AP
File: linksys-ea6350-webflash.bin
Kernel: Linux 4.4.213 #867 SMP Thu Feb 6 21:24:35 +04 2020 armv7l
Reset: Yes (NVRAM ERASE)
Status: OK


Is "Port Forwarding" or "Port Range Forwarding" working?.
Because I try to open one port TCP for Transmission (torrent), and when I test if it is open, it tell me that is closed. With aMule happen same thing. I try with UPnP too, but doesn't work.
What i'm doing wrong?.
In others previus versions, I'm allways opened ports at the same way and it worked fine.
Thank you.
Regards.


yes its working and transmission allows also to use upnp which works too. so you dont need port forwarding for transmission at all. so the randomize port can be used.
but i can tell you one thing. the transmission test port feature you find in transmission itself is not working and can be ignored. it does nothing


You're right. The problem is in the ISP provider router (set as bridged mode). But in "bridged mode", because if I connect my PC direct to this router, all those (torrent, kad, etc.) ports are also closed.
Now, I was reset the ISP router to default settings (they blocked admin user by policy, I guess), set the UPnP service as enabled, and then as a bridged mode again.
Now, I can get out to internet through my EA6200 without problems.
At least until they reapply his policys. But this problem is between them and me...
Thank you by you reply, time and all you do!.
Best regards.
Veritech
DD-WRT User


Joined: 02 Jan 2007
Posts: 192

PostPosted: Mon Feb 10, 2020 1:13    Post subject: WRT54GSv1 WNDR4500v2 RT-N66R Reply with quote
Router/Version: WNDR4500v2
Mode: Router/AP
File: DD-WRT v3.0-r42287 giga (02/06/20)
Kernel: Linux 3.10.108-d10 #2116 Thu Feb 6 15:23:22 +04 2020 mips
Status: Working
Uptime: 46 Min
Reset: No
Temps: WL0 45.1 °C / WL1 45.5 °C

Router/Version: RT-N66R
Mode: Router/AP
File: DD-WRT v3.0-r42287 big (02/06/20)
Kernel: Linux 3.10.108-d10 #2128 Thu Feb 6 15:34:50 +04 2020 mips
Status: Working
Uptime: 6hrs 29min
Reset: No
Temps: WL0 52.1 °C / WL1 50.3 °C

Router/Version: WRT54GSv1
Mode: Router/AP
File: DD-WRT v3.0-r42287 mega (02/06/20)
Kernel: Linux 2.4.37 #58887 Thu Feb 6 09:01:11 +04 2020 mips
Status: Working
Uptime: 6hrs 55min
Reset: No
Temps: Not Supported

I rebooted the WNDR4500v2 before the update and started the update once it was back up. I find that for this router it is best as if it has a long uptime the crc check on reboot fails after uploading the update via the webui.

Previous versions for each router was build 42132. Builds prior to 42132 had a webui hang issue so I'll watch for that on this build.
CEGN
DD-WRT User


Joined: 05 Nov 2010
Posts: 58
Location: Mx

PostPosted: Mon Feb 10, 2020 6:55    Post subject: Reply with quote
BrainSlayer wrote:
CEGN wrote:
BrainSlayer wrote:
CEGN wrote:
Router/Version: Linksys EA6900 v1.1
Mode: Gateway
Kernel: Linux 4.4.213 #867 SMP Thu Feb 6 21:24:35 +04 2020 armv7l DD-WRT
Reset: Installed and reset from CLI
Status: Issue...

Proftp: need a reboot to start the service after configure, and is not showing files (maybe is just me, so will keep researching).

Dlna: It seems that in some way, it doesnt see the database. During the configuration, had to rebuild the database (done correctly), but after reboot, it report 0 files. The database file exist and is not empty, but is not taken by the Dlna


sounds like you configured wrong paths



I dont think so, because before posting, i did the configuration twice (reset and configure x2), i checked the paths now and all of them are ok.

About the Dlna, im sure is not about my config, cause after activate it, set the path and rebuild the database, i have access to the files from the hdd, even play videos from there. But after the router reboot, lost the access to those files, the dlna page report 0 files (http://192.168.69.1:8200/), the config (path) is still there, and the database at /jffs/minidlna/files.db exist and is not empty. The Dlna works normal but if the router reboot, you have to rebuild the database (option "Clean Database now") to make it work again.


Will try to re-download, reflash and check.


dlna reports only 0 files if dlna cannot find any files under the given path or the db is broken. my hint. maybe disable jffs. depending on your movie db size it might be to small



First of all i want to thank you your answers...

Agree, is logic that if the dlna dont see files its cause the path is wrong, but after config the paths, and rebuild the database i can access all the files (music, videos, images) so that tell me that the path is right. The thought about a broken db could be positive, but i already formatted the partitions (opt and jffs), verified the database (a backup of it) using an external program to check the content and everything looks fine. Btw the size of the db is 3,612 kb.

report of Dlna page before reboot:
Audio files 970
Video files 237
Image files 221

Setup of the hdd:
/dev/sda1 mounted to /opt
/dev/sda2 mounted to /jffs
/dev/sda3 mounted to swap
/dev/sda4 mounted to /tmp/mnt/sda4

(partitiions labeled as opt, jffs, so they automount) and the option of JFFS2 Support is disable, i never activate that.


mwchang wrote:
BrainSlayer wrote:
sounds like you configured wrong paths

Or maybe the USB drives were mounted with different paths...



All the paths checked and are as always.


Also, already re-download the firmware file, installed, reset and re-config (manually of course) and have the same behavior.

_________________

  • Linksys EA6900 + Vortex CFE
  • Linksys E900
Lanchon
DD-WRT Novice


Joined: 05 Oct 2019
Posts: 17

PostPosted: Mon Feb 10, 2020 8:07    Post subject: nvram restore failures Reply with quote
jwh7 wrote:
Lanchon wrote:
since i mentioned my previous hurdles with the AC1450, could anybody shed some light on the nvram restore issue?
Didn't quite follow what you were saying? How did you reset? When reset, at bootup the CFE embedded defaults will get populated, like default IP, MAC, memory registers, etc. The rest needs to be manually set up via the GUI, or by restoring a backup. Just note that using an old backup may be a bad idea. See these:
https://wiki.dd-wrt.com/wiki/index.php/Factory_Defaults
https://wiki.dd-wrt.com/wiki/index.php/Hard_reset_or_30/30/30#Erasing_NVRAM
As a reminder, don't 30-30-30 an ARM router.

WRT54GLv1.1: Client Bridge
File: 42287 nokaid_generic.bin
Kernel: Linux version 2.4.37 (gcc version 9.2.0)
Status: CLI upgrade from 39688. Just updated to see if IPv6 really is still in the nokaid_generic build (it is) and/or nokaid_special_generic (it isn't), for another thread. Didn't try IPv6, but the CB is working fine, considering. Wink


thanks!

first let me repeat the description i gave before and i'll expand next:

> (FYI, restoring nvram resulted in some critical nvram values getting deleted/cleared (they are present in the backup but they are not restored). which values did not get restored was a bit random depending on the router state prior to the restore. to fix the issue i had to try and look for a restore attempt that mostly worked and then manually set the missing nvram values using the command line. this process was very time consuming because basic router parameters like IP, mask, ssh configuration, etc were usually lost. in all cases, a reset made the router boot again. but this particular router is hard to factory-reset.)

to explain better: for each fw version that ran on my router(s) i have an archive of the firmware image with its corresponding nvram backup. so to go back in time i just need to flash any archived image with "reset settings" enabled, reboot, and restore its corresponding nvram backup.

the usual routine is that i backup nvram and upgrade firmware without settings reset and stuff just works. i've got scripts that do this automatically on my routers (see my github: https://github.com/Lanchon/ddwrt-autoupdate).

but somewhere along the line things broke. i wanted to make a config change for testing some stuff, and instead or reverting (i am lazy), i just made an nvram backup before starting the changes. after the test i restored the backup (the one i just made manually, under the same firmware) and hell broke loose: the router reverted to default IP and many default settings, and half of the stuff was misconfigured. so i restored the auto nvram from the last auto update: no difference (the backups were almost identical btw). so i restored an earlier nvram: nope. i restored many previous firmwares with reset, then restored their corresponding nvram: nope.

so each nvram restore failed to restore SOME nvram values. the values are there in the backups if i dump them, but once restored they are missing from the router. a restore good enough to boot the router followed immediately by a new backup shows values missing from the new backup (if you compare the backup dumps from before and after the restore-backup roundtrip).

which values go missing is pseudo-random, and they could be many or few. each restore attempt possibly needed settings reset (when the login credentials were affected or the router did not boot), possibly needed reconfiguration (configuring IP, netmask etc), possibly locked me out of ssh, etc, so this was very time consuming.

i 'fixed' the issue by finding and earlier firmware and corresponding nvram backup that, when restored, left only a few missing nvram values (ie: stuff mostly worked). next i took a new backup and compared it with the just-restored backup to find the missing values. then i ssh'd and set the missing values via command line. finally i rebooted and took a new backup to confirm that there were no missing values anymore (which was true).

then i was ok but back in time. so i upgraded firmware compared the current state with the latest nvram backup in my archive and fast-forwarded the config manually via ssh (worked fine).

to recap: at some point in the recent past (some months), if i took an nvram backup of my working router and immediately restored it, the state of the router was totally screwed up. because of the trouble to get the router back online, i did not want to debug the issue further.

my NVRAM: 43 KB / 64 KB
no JFFS2
USB pendrive on /opt


FYI i have a 'startup command' that does some stuff and leaves some processes running. it is pasted next with COMMENTS IN ALL CAPS.

Code:


THIS IS FOR ENTWARE VIA SSL (SEE MY GITHUB: https://github.com/Lanchon/ddwrt-secure-entware):

echo 'export PATH="/opt/bin-override:/opt/sbin-override:$PATH"' >>/tmp/root/.profile
chmod +x /tmp/root/.profile


### Replace DD-WRT dropbear with Entware's
ENABLES SFTP (DD-WRT DROPBEAR FAILS TO LOAD SFTP):
(SFTP IS NEEDED FOR GUI FILE ACCESS FROM UBUNTU/MINT)

{
usleep 100000
DB_CMD="$( ps -o args | grep -m1 dropbear )"
killall dropbear
usleep 100000
/opt/sbin/$DB_CMD -P /var/run/dropbear.pid &
}


### Blink led according to connection status
CHECKS CONNECTIVITY WITH NEXT-UPSTREAM-HOP ROUTER AND THE INTERNET
AND SHOWS PING TIME BY FLASHING A LED:
(TWO SHORT FLASHES MEANS NO RAIN)

{
# 8:/USB
led_on() { gpio disable 8; }
led_off() { gpio enable 8; }
ping_test() { led_on; ping "$1" -c1 -W2 -q >/dev/null; local v=$?; led_off; usleep 200000; return $v; }
while :; do
  if ping_test 192.168.0.1; then if ping_test 1.1.1.1; then sleep 1; fi; fi
done
} &


### Install custom handler for SES button
THIS APPLIES A WORKAROUND NEEDED FOR SECURITY ON VIRTUAL INTERFACES TO WORK:
(REQUIRED FOR MY CHIPSET. ASK ME FOR MORE INFO, ISSUE IS 100% REPRODUCIBLE.)
(I NEED TO HIT THE BUTTON IF I RECONFIGURE WLAN VIA THE GUI AND DO NOT REBOOT.)

{
mkdir -p /tmp/etc/config

cat >/tmp/etc/config/handler.sesbutton <<'EOF'
#!/bin/sh
LED=3 # /LED_POWER_AMBER
gpio disable $LED
stopservice cron

if [[ "$1" != -q ]]; then
  # Power-cycle the radios
  startservice radio_off -f
  startservice radio_on -f
fi

# Apply quarkysg's Broadcom virtual IF auth workaround
stopservice nas
stopservice wlconf
wlconf eth1 up
wlconf eth2 up
startservice nas

startservice cron
gpio enable $LED
EOF

chmod +x /tmp/etc/config/handler.sesbutton
}


#sleep 3
APPLY VRITUAL IF WORKAROUND ON BOOT:
/tmp/etc/config/handler.sesbutton -q
THIS SCRIPT CHECKS UPSTREAM CONNECTION AND RESTARTS THE WLAN ON FAILURE:
/opt/opt/watchdog &
/opt/opt/iodine/iodined-run &
/opt/etc/init.d/rc.unslung start

Lanchon
DD-WRT Novice


Joined: 05 Oct 2019
Posts: 17

PostPosted: Mon Feb 10, 2020 9:24    Post subject: Reply with quote
strange behavior:

on Admin/Commands run this command:
Code:

FOO=yes ; echo foo: $FOO ; PATH=nope ; echo path: $PATH


it outputs:
Code:

foo:
path: /sbin:/bin:/usr/sbin:/usr/bin


why?
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 10127
Location: Netherlands

PostPosted: Mon Feb 10, 2020 10:47    Post subject: Reply with quote
Do not use the RUN option, you have to escape all special characters and for each command a new subshell is opened, I guess
_________________
Routers:Netgear R7800, R6400v1, R6400v2, Linksys EA8500, EA6900 (XvortexCFE), E2000 (converted WRT320N), WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Lanchon
DD-WRT Novice


Joined: 05 Oct 2019
Posts: 17

PostPosted: Mon Feb 10, 2020 19:00    Post subject: Reply with quote
egc wrote:
Do not use the RUN option, you have to escape all special characters and for each command a new subshell is opened, I guess


thank you. i do use the run option for testing purposes. of course nobody really needs run, but i use the startup, shutdown and firewall scripts, as many other people, and i was not aware of any need for character escaping. is this a known issue? where is this documented or discussed?

> for each command a new subshell is opened, I guess

this is what i immediately suspected before asking (although there is no valid reason to code this behavior i think). so i tested:

Code:

{ FOO=yes ; echo foo: $FOO ; } ; PATH=nope ; echo path: $PATH


and it produces the same result as without the braces. this does not bode well for the "subshell" hypothesis, so for now i disbelieve it.

can anybody shed some light? thanks!
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 7325
Location: Dresden, Germany

PostPosted: Tue Feb 11, 2020 10:23    Post subject: Reply with quote
the line is executed using the shell commmand "eval"
basicly its done this way
alias ping=\'ping -c 3\'; eval \"%s\" > %s 2>&1 &

this is why its not working. you cannot change the environment that way you're doing it
however. it will savelly work to use "export"
{ export FOO=yes ; echo foo: $FOO ; } ; export PATH=nope ; echo path: $PATH

_________________
"So you tried to use the computer and it started smoking? Sounds like a Mac to me.." - Louis Rossmann https://www.youtube.com/watch?v=eL_5YDRWqGE&t=60s
Goto page Previous  1, 2, 3 Display posts from previous:    Page 3 of 3
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware 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