Can't run shell script

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Advanced Networking
Author Message
wrtmoron
DD-WRT Novice


Joined: 15 Aug 2019
Posts: 3

PostPosted: Thu Aug 15, 2019 0:15    Post subject: Can't run shell script Reply with quote
DD-WRT Version: v3.0-r37305 big (10/10/18)
Router model: Linksys E2500

As the title says, I am unable to run shell scripts whether it's through the rc_startup variable, SSH, etc. I always get the error: sh: 3: Invalid argument

I did find this bug report #6373 that claims this is a BusyBox issue.

Is there a workaround for this shell issue? Or is there another DD-WRT version I can flash on my router (preferably a newer one) that isn't plagued by this issue perhaps?

I'm happy to provide any additional information that might help.
Sponsor
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 2683
Location: Texas, USA

PostPosted: Thu Aug 15, 2019 1:32    Post subject: Reply with quote
Yes, the workaround is "Don't use K2.6 builds unless you have no choice because of your device until BrainSlayer fixes them." Use the K3.x builds. Now that being said, depending on your requirements and how concerned you are with security, you could roll back to 30880 or 33772 or perhaps 35531 K2.6 build and be fine to a point. It's a BusyBox/DD-WRT shell issue which has slowly become a broken pile of mess in the K2.6 builds. I am still looking to get a v4 to open up and see what hardware is in it, but I have an E2500v3 that is on stock firmware at the moment.
wrtmoron
DD-WRT Novice


Joined: 15 Aug 2019
Posts: 3

PostPosted: Thu Aug 15, 2019 1:44    Post subject: Reply with quote
Quote:
Don't use K2.6 builds unless you have no choice because of your device until BrainSlayer fixes them.


I guess I read that, but my brain didn't make the connection, haha. Greeted by the individual who wrote the comment in the bug report too. Not my proudest moment. I'll install 40559 K3 then.

If you need someone to help test this type of thing, let me know, and I'll be happy to PM you my email.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 2683
Location: Texas, USA

PostPosted: Thu Aug 15, 2019 1:55    Post subject: Reply with quote
Yeah, I initially wrote that ticket while testing another ticket issue, which I closed because it was essentially invalid. There's another ticket about the ongoing issues with the K2.6 builds' shell woes referenced as well. I still have to dig into it to see where things broke and see if I can't submit a patch. I don't see why a kernel version would break things, though.... Rolling Eyes

I may test the current K2.6 builds on one of my spare test bench units to see if it's still broken or any worse (I won't hold my breath)... Cool
wrtmoron
DD-WRT Novice


Joined: 15 Aug 2019
Posts: 3

PostPosted: Thu Aug 15, 2019 2:06    Post subject: Reply with quote
Quote:
I don't see why a kernel version would break things, though....

Probably something like this:
Code:
if [ $(uname -or | cut -d'-' -f 1) -lt "3" ]; then
    rm -f /bin/busybox
fi
Very Happy
SurprisedItWorks
DD-WRT Guru


Joined: 04 Aug 2018
Posts: 508
Location: Appalachian mountains, USA

PostPosted: Thu Aug 15, 2019 15:29    Post subject: Reply with quote
[quote="wrtmoron"]
Quote:
I'll install 40559 K3 then.

Isn't 40559 actually a K4 (Kernel 4.x) build? I'm not actually on it yet or I'd answer my own question. I'm on 40009, which is K3.

_________________
Six Linksys WRT1900ACSv2 (38159, r39144, 40009, 40784):
VLANs, multiple VAPs, NAS, QoS, client-mode travel router, OpenVPN client/PBR (old=NordVPN, new=AirVPN), two DNSCrypt servers (incl Quad9) routed through vpn.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 2683
Location: Texas, USA

PostPosted: Thu Aug 15, 2019 15:59    Post subject: Reply with quote
SurprisedItWorks wrote:
wrtmoron wrote:
I'll install 40559 K3 then.

Isn't 40559 actually a K4 (Kernel 4.x) build? I'm not actually on it yet or I'd answer my own question. I'm on 40009, which is K3.


Not on Broadcom MIPS devices newer than the old WRT54s. Usually a 3.10.108.x kernel if it's not a 2.6. kernel, which are the borked builds in question.
SurprisedItWorks
DD-WRT Guru


Joined: 04 Aug 2018
Posts: 508
Location: Appalachian mountains, USA

PostPosted: Thu Aug 15, 2019 17:28    Post subject: Reply with quote
kernel-panic69 wrote:
SurprisedItWorks wrote:
wrtmoron wrote:
I'll install 40559 K3 then.

Isn't 40559 actually a K4 (Kernel 4.x) build? I'm not actually on it yet or I'd answer my own question. I'm on 40009, which is K3.

Not on Broadcom MIPS devices newer than the old WRT54s. Usually a 3.10.108.x kernel if it's not a 2.6. kernel, which are the borked builds in question.

Amazing that BS can keep dd-wrt going on so many different platforms with different requirements. What will we do if he ever "retires" from this effort???

_________________
Six Linksys WRT1900ACSv2 (38159, r39144, 40009, 40784):
VLANs, multiple VAPs, NAS, QoS, client-mode travel router, OpenVPN client/PBR (old=NordVPN, new=AirVPN), two DNSCrypt servers (incl Quad9) routed through vpn.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 2683
Location: Texas, USA

PostPosted: Fri Aug 16, 2019 1:45    Post subject: Reply with quote
SurprisedItWorks wrote:
Amazing that BS can keep dd-wrt going on so many different platforms with different requirements. What will we do if he ever "retires" from this effort???


Send a recon team in to confiscate the public and private source code repositories and turn it over to a l33t t34m of hackers and coders. Evil or Very Mad Twisted Evil Mr. Green Cool Razz Idea

Joking, of course!
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Advanced Networking 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 cannot attach files in this forum
You cannot download files in this forum