You are not logged in.
Hello:
Playing around with SSH and my new My Book Live thingy, i have found a few things I'm used to do not work as expected.
This is the OpenWRT installed on the unit:
~# uname -a
Linux_book 5.4.179 #0 Wed Feb 16 20:29:10 2022 ppc GNU/Linux
~#
dmesg shows this:
One of those things is the bash history I use a lot.
It is an important part of my slow-ish training to eventually master the use of the terminal as much as possible.
eg: the history does not survive a reboot of the system.
How can I fix this?
Thanks in advance,
A.
Last edited by Altoid (2022-04-14 14:19:49)
Offline
try these in your .bashrc if you do not already have them.
export HISTSIZE=10000
export HISTFILESIZE=10000
export HISTCONTROL=ignorespace:ignoredups
Offline
Hello:
try these in your .bashrc if you do not already have them.
export HISTSIZE=10000 export HISTFILESIZE=10000 export HISTCONTROL=ignorespace:ignoredups
Hmm ...
I don't have a user set up on this system.
Maybe that's the reason? Have not had time to set up sudo either yet.
Edit:
I keep forgetting that this is a small footprint OS for embedded systems, a very different type of Linux.
That means that I should look in the right place and not bug my fellow Dev1 members.
OpenWRT does not use bash but ash.
From: https://forum.openwrt.org/t/enable-bash-history/70815
Ash (mainly the dash fork) is also fairly popular in embedded Linux systems. dash version 0.3.8-5 was incorporated into BusyBox 3, the catch-all executable often employed in this area, and is used in distributions like DSLinux, Alpine Linux 1, Tiny Core Linux and Linux-based router firmware such as OpenWrt, Tomato and DD-WRT.
and
ash is provided by busybox, which provides all basic shell & Linux default app features in OpenWrt.
You can enable the history feature in busybox and recompile a personal version of it for yourself, so that you can have ash that remembers history.
ash is part of the firmware image and while I can install the bash package, it will not survive a system upgrade.
There seems to be a work-around, I'll have to investigate further.
Thanks a lot for your input.
Best,
A.
Last edited by Altoid (2022-04-14 14:58:32)
Offline
surely that system would have to enable some sort of admin, i suppose it would depend on how that particular embedded devices busybox was built too?
Not quite sure but i think it is possible to build busybox ash, bash with certain flags to enable features like history and such, might be worth it to look into the busybox documentation.
Offline
Hello:
... that system would have to enable some sort of admin ...
... possible to build busybox ash, bash with certain flags to enable ...
Could be.
But the idea is to avoid building anything with/for OpenWRT as it would complicate eventual sysupgrades.
I found this:
https://forum.sailfishos.org/t/busybox- … sh/6808/11
Not really a big deal.
When I finally get this NAS figured out and running as I want, I won't be needing access all the time like I'm having to do now.
I'll mark this thread solved.
Thanks for your input.
A.
Last edited by Altoid (2022-04-15 22:49:18)
Offline