Joined: 06 Jun 2006 Posts: 7463 Location: Dresden, Germany
Posted: Fri Aug 26, 2022 14:06 Post subject:
let me add something to this bullshit. dd-wrt does not add crlf it takes what it gets. please kindly ask your local browser vendor why he is doing that shit. and btw. if you save startup etc. dd-wrt removes all \r instances
edit: made a quick and dirty generic solution which corrects all nvrams once they got written _________________ "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
let me add something to this bullshit. dd-wrt does not add crlf it takes what it gets. please kindly ask your local browser vendor why he is doing that shit. and btw. if you save startup etc. dd-wrt removes all \r instances
edit: made a quick and dirty generic solution which corrects all nvrams once they got written
Thanks. I agree it's a browser/Windows issue but it's not like Microsoft will change for me or any of us. So sometimes we need to clean up other people's mess -- and certainly don't let the sloppiness/laziness of others infect the cleanliness and consistency of our beautiful nvram
Wasn't clear to me though why text boxes in the command tab removed \r while elsewhere they didn't.
In my case I have removed privoxy from my build since I'm now using entware's privoxy so I cleaned up the privoxy_conf variable manually. You can see the offending variables with the above command without the -c as below:
Code:
nvram show | grep $'\r'
The name of the variables usually give a good hint as to which page needs re-saving.
Joined: 04 Aug 2018 Posts: 1444 Location: Appalachian mountains, USA
Posted: Tue Aug 30, 2022 20:15 Post subject:
OK guys... I have seen these ^M chars on and off for years, especially in the OpenVPN config nvram vars, and I have never been near dd-wrt's GUI with a Windows machine. I use linux exclusively (and have for over 35 years if we include pre-linux Unix species). I maintain the important large nvram vars (additional config windows, etc.) in emacs on my laptop and have makefile scripts to scp them to dd-wrt and put them back into their nvram vars. When I strip off the ^M chars in emacs, they go back over clean. But some lesser-used dd-wrt action (GUI? post-flashing setup? just guessing here) does occasionally restore the ^M chars.
I used to care, until it was discovered that my model router has 2x the nvram space we all thought it had! _________________ 2x Netgear XR500 and 3x Linksys WRT1900ACSv2 on 53544: VLANs, VAPs, NAS, station mode, OpenVPN client (AirVPN), wireguard server (AirVPN port forward) and clients (AzireVPN, AirVPN, private), 3 DNSCrypt providers via VPN.
I also stated on page 1 that saving the additional cron jobs with linux firefox adds the ^M. The "browser thing" link I gave on page 1 says "The canonical form of any MIME "text" subtype MUST always represent a line break as a CRLF sequence." so the linux browsers are probably following the spec. Any dd-wrt after r49908 cleans up the carriage returns when a page's variables are saved to nvram. The ^Ms on multi-line nvram variables are a thing of the past.