[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: History in busybox shell doesn't work
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2007-12-21 15:06:58
Message-ID: 200712211506.58519.vda.linux () googlemail ! com
[Download RAW message or body]

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
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic