Then the progress status doesn't matter as much. I can't do more than tweak a few lines.
I've found another script that can output the progress here https://github.com/axelabs/splitcurl
Also, joining the parts takes some time, do you want to add the status update similar to the screenshot below?
Added your file joining progress messages and the downloading progress messages from the other script you found. It really looks more polished with the progress messages. Thanks for the free code.
Set the default number of parts to 8 in the sample easyddup.ini file. The cool graph shows there's significant gain with 8 and not everyone will have as powerful a router as you.
Notes:
Suggestions are welcome, just don't be disappointed if only small things get done. Yes an animated gif to replace the old image in the OP would be great.
The best part of easyddup is the nvram tool ported from another project (see OP). It even has a migration mode for setting up a new/different router. Manually entering many settings should be obsolete.
Unfortunately the number of tech savvy dd-wrt users is dwindling so people such as yourself who can tinker under the hood are fewer and fewer but some stuck around.
In the GIF I only show the INI file and normal FW upgrade. If you want to show anything else please let me know. I think it's better to append than to replace the old image.
Actually I think that the FW upgrade feature is also very convenient. Previously I always have to:
manually download the new FW file (this step includes digging into the list of devices and clicking on the link to the fW file),
open ddwrt control panel, navigate to Admin > Backup tab, click on Backup, choose where to save the file (in case something goes wrong with the new FW), then
navigate to Upgrade tab, browse to the new FW file and click on Upgrade.
Surely it's not complicated, but repeating all these steps is really boring and unproductive, especially if you want to keep up with BS new builds (at most a few days for a new build). It's 2021 now, AI is everywhere, there's a virtual personal assistant in every mobile phone, cars can drive by themselves, so if this FW upgrade can't be 100% automated then it should at least be effortless and enjoyable.
For cleaning up the nvram backup, I think there should be another script to check & cleanup the duplicated files, then there's a param in the ini file to enable/disable calling that new cleanup script. The way to identify the duplicate is to compare the hashes of nvram-all-* files. If the nvram-all- are the same then the nvram-ini-, nvram-restore-, nvram-usr- should be identical also. Only the older duplicate files should be deleted so that nvram-restore-latest.sh is not broken. Probably it's like this:
sort nvram-all-* files by name in reverse order (ls nvram-all-* | sort -r)
for each nvram-all- file in sorted list
get unique part of file name (date time mac behind the nvram-all- prefix)
get hash (md5sum from busybox)
compare with previous file's hash (null if first file)
if same hash: delete nvram-all-, nvram-restore-, nvram-usr- with the same date time mac above
Added the demo gif to the OP, thanks! It's perfect but the forum's banner limits the useful vertical pixels so on a 1080p monitor, a tall image is harder to see. You might want to remove your post's copy to save space.
Good suggestion for a cleanup script but not making any promises.
How about an auto_select_latest ini option in upgrade mode. Would need to make sure it's not already installed however. In downgrade mode manual selection is necessary.
Don't assume the backup created by easyddup saves all the settings you care about. The OP warns that the ini file that defines what to save needs contributions/augmenting.
Added the demo gif to the OP, thanks! It's perfect but the forum's banner limits the useful vertical pixels so on a 1080p monitor, a tall image is harder to see. You might want to remove your post's copy to save space.
I restrained the width to fit the 768px rule but I totally forgot about the height. Too bad, lazy mode has kicked in, I'll record another one if there is a new update.
Can I add this to my signature?
How about an auto_select_latest ini option in upgrade mode. Would need to make sure it's not already installed however. In downgrade mode manual selection is necessary.
Definitely I will use it. Just a side note, with that option it will be very tempting to set up a cron job for auto FW upgrade, which is not yet clear if it's salvation or gateway to doom
yoyoma2 wrote:
Don't assume the backup created by easyddup saves all the settings you care about. The OP warns that the ini file that defines what to save needs contributions/augmenting.
Added EDDUP_AUTO_SELECT_LATEST and renamed EDDUP_AUTO_SELECT to EDDUP_AUTO_SELECT_FILE to avoid confusion so edit your existing easyddup.ini file accordingly.
Theoretically a cron job could now be used to fully automate updates just like kong's ddup permitted. I would try this on a secondary tinkering router and not your main one. Kong builds were more rare and more tested. BS builds are much more frequent and slightly better than developer nightly builds.
Notes:
Yes the "all" files have everything. I meant the other files have only the nvram variables listed in the nvram-dd-wrt.ini file. These variables are safe between build numbers and even between routers in some cases.
Sure that line in your signature would be cool. I edited the demo gif comment to give credit.
@IONK
I put your new demo in the OP. A complete update by typing a single command. Very nice gif! You can delete your post's copy or is that ninja editing?
This is a start to get the distribution type and format string for printf:
Code:
nvram get dist_type
strings /usr/sbin/httpd | grep 'DD-WRT ' | grep -v 'Control Panel' | grep -v Development
Thanks! Now I only need to play around with the send email template included in easyddup. The final goal is that it can automatically check for new version, upgrade FW, and send me the email with the filled in form so I can post to the "New Build" thread.
On second thought, maybe I can also let it login to the forum, find the correct "new build" thread, and post the form automatically.
When I posted this screenshot I had looked through the dd-wrt code so by chance you asked something I already knew.
I was thinking of adding hook(s) so user code could be included/run such as your reports.
Are the new build forum threads created by anyone who happens to notice a new build for their platform? Is it possible you notice the new build before the thread even exists?
Automated build thread reports are pointless without user feedback over time and logs.
I think most people don't bother to report after upgrading FW if they don't encounter any issue. Also, I think even my manual reports' credibility is questionable, because I only use a very small subset of features available on DD-WRT, with specific settings that are not reflected in the reports. Should I wait for 1 hour or 1 day or 1 week to confirm the stability? Should I add more devices to my network and do some stress test to check the throughput? Should I run some automated vulnerability scanning tool to verify the basic security?
For me, as long as it can boot up after FW upgrade and my 2 devices are connected and I can access the internet then it's considered a milestone.
Joined: 08 May 2018 Posts: 13904 Location: Texas, USA
Posted: Sun Mar 14, 2021 2:19 Post subject:
blkt wrote:
Automated build thread reports are pointless without user feedback over time and logs.
Agreed.
IONK wrote:
I think most people don't bother to report after upgrading FW if they don't encounter any issue.
People don't report after flashing and then we have people asking, "What's the latest build that works / is stable for my router?"... flash and report. Not doing so is a complete disservice to the forum and community at large and it is cumbersome dealing with the lack of reporting (because everyone was horning in on the device threads and creating a cesspool of (mis)information). I personally have gotten in the habit of watching release threads and development and timing my upgrades around once a month. Only recently have I upgraded more often due to specific issues. _________________ "Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT Pogo - A minimal level of ability is expected and needed... DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)
----------------------
Linux User #377467 counter.li.org / linuxcounter.net