Shell history is preserved
Shell command history is now preserved across sessions by storing it in a RAM-backed filesystem.
Benefits:
Command history is no longer lost between logins
No unnecessary writes to flash storage by default
For users who prefer persistent history storage, this behavior can be changed by editing: ''/etc/profile.d/busybox-history-file.sh''
:warning: Note: Storing history on flash will increase write cycles and may impact flash endurance over time.
But it seams not work. I checked /etc/profile
[ -n "$FAILSAFE" ] || {
for FILE in /etc/profile.d/*.sh; do
[ -e "$FILE" ] && . "$FILE"
done
unset FILE
}
So it has to be in failsafe mode to make it work ?
You can make it permanent as described in the 25.12.0 release notes:
Basically edit /etc/profile.d/busybox-history-file.sh to point to persistent storage instead of /tmp or /var (which by defaults points to /tmp on OpenWrt).
Yes, and it can be very useful for debugging, particularly when investigating what things that cause reboots or crashes/lockups.
BUT The very next line after the one you quoted from your link says:
Note: Storing history on flash will increase write cycles and may impact flash endurance over time.
For the benefit of others reading this thread:
It is not a matter of "may impact flash endurance", but more like "WILL impact flash endurance".
Verbose logging can destroy a flash chip in as little as weeks. If you are lucky it might take months.
If you are VERY lucky it might take years.
If you want to have permanent non-volatile logs, you should use a usb memory stick.
A damaged memory stick is just a PITA.
A damaged flash chip on your router is a catastrophic failure.