... However, one of the ways I use YazDHCP is when I occasionally perform a factory default reset and then re enter my configurations. One of the most time consuming is entering the DHCPs. YazDHCP speeds this up significantly. But, I like specific icons assigned to my clients. These need to be assigned by hand. It would be nice if YazDHCP could save and restore these, too.
I've modified my old script to specifically target the "
/jffs/usericon" directory.
UPDATE [
2023-Mar-09]
Given new information, the script has been updated as explained in
post #294.
The script is now available in PasteBin:
Bash:
mkdir -m 755 -p /jffs/scripts
curl -kLSs --retry 3 --retry-delay 5 --retry-connrefused pastebin.com/raw/6ZHZHpMk | tr -d '\r' > /jffs/scripts/SaveRestoreUserIcons.sh
chmod 755 /jffs/scripts/*.sh
With this script, one can easily create time-stamped tarballs of the "
/jffs/usericon" directory, and then restore the icon images from a selected tarball. Note that by default the tarballs are created on the USB drive where Entware is installed (i.e.
/opt/var/SavedUserIcons). If the USB drive is not available, then the archives are created in the "
/jffs/scripts/SavedUserIcons" directory. You can change the default directory location by modifying the variable in the "CUSTOMIZABLE PARAMETERS SECTION."
Bash:
userIconsSavedDir="/opt/var/SavedUserIcons"
Make sure that it's in a location that is persistent across reboots and across factory defaults resets so that the tarballs are available afterward to restore the files.
To run the script simply call it without any arguments. It's menu-driven so no other instructions are needed, IMO.
Bash:
/jffs/scripts/SaveRestoreUserIcons.sh
Now, the next step is to test & verify if *after* a factory defaults reset, restoring all the icon images & files into the "
/jffs/usericon" directory is sufficient to fully & properly re-establish the icon-to-client associations that are ultimately shown on the WebGUI. Obviously, the only way to do that is to do the factory reset. Currently, it's not a good time for me to reset my router in the middle of a busy work schedule, plus the kids' & wife's work/school responsibilities, but if you can and want to try it out, please let us know of the results. Without knowing with certainty that the current hypothesis is correct, I wouldn't really want to modify YazDHCP.