History in busybox shell doesn't work
Denys Vlasenko
vda.linux at googlemail.com
Fri Dec 21 07:06:58 PST 2007
On Friday 21 December 2007 00:23, Praba Rajah wrote:
> I press the up key and I expect my previous command , but instead I see
> nothing. The command prompt is empty.
>
> All three terminals are sent same char sequences. Up arrow is same as
> you.
> When I type "history" in the debug port command prompt I am getting:
>
> # history
> sh: history: not found
>
>
> But when I type in the telnet terminal or Serial port terminal I am
> getting
>
> # history
> -ash: history: not found
>
>
> Also I have noticed -ash process started after telnet / serial port
> connection were made.
You have CONFIG_FEATURE_SH_IS_ASH=y. So sh and ash are the same.
> We are using different .config files for each versions. Version 1.7.2
> .config file which doesn't work is attached here. Please have a look.
Just built 1.7.4 with this .config and it works for me.
Under strace, I see that it opens history file:
open("/home/vda/.ash_history", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 5
It does not matter whether I run it as "sh" or "ash", it opens the same file.
Can you run shell under strace? "strace -o log sh", press [up arrow], exit.
Does history work for you if you build busybox on desktop machine
with same .config?
--
vda
More information about the busybox
mailing list