busybox: Save shell history into /tmp
authorHannu Nyman <hannu.nyman@iki.fi>
Thu, 5 Dec 2024 20:28:45 +0000 (22:28 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 8 Dec 2024 18:18:02 +0000 (19:18 +0100)
commite23b37b2d9a2e766b1ad151f59a04eb68b6a3341
tree2b7f7aecf764b614712da4d67d2d8166c1aa2980
parent0826b224b5210fc6f0681c9324dca974d507a8f7
busybox: Save shell history into /tmp

Enable the busybox feature to save shell command history.
(.apk size increase 0.5 kB)

To prevent flash wear,
* save history only at the exit from a shell session, and
* set /tmp as the default location for the history file. The history
  is kept on ramdisk until a reboot, when the history is then lost.

If the user wants to save history onto flash, he can change the location
definition in /etc/profile.d/busybox-history-file.sh

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/17179
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/utils/busybox/Config-defaults.in
package/utils/busybox/Makefile
package/utils/busybox/files/busybox-history-file.sh [new file with mode: 0644]