[BusyBox] something wrong with PS1 command prompt edit in rc2?
Fred Richards
tech at geexology.org
Wed Jul 28 15:29:46 UTC 2004
Hi folks,
I use busybox for my wrt54g at home, and it's awesome. In fact, I've been
creating my own firmwares from sveasoft's source... including adding the latest
version of busybox. I wanted to get rc2 going for the idea that the module
option loading has been fixed ... but there's something up with the parsing of
the PS1 env variable ... only thing that was changed in ash.c was the following:
/*
* PS1 depends on uid
*/
#if defined(CONFIG_FEATURE_COMMAND_EDITING) && defined(CONFIG_FEATURE_SH_FANCY_P
ROMPT)
vps1.text = "PS1=\\h:[\\w]\\$ ";
#else
if (!geteuid())
vps1.text = "PS1=# ";
#endif
...
The vps1 line was this: vps1.text = "PS1=\\w \\$ ";
I know, I know, this can be changed with a .profile... but my root fs is
running from ram, so the less files, the better. I compiled busybox by itself
and can run it on my wrt54g, but watch what happens:
rtr:[~]# ls -la ./ash
lrwxrwxrwx 1 root root 9 Jul 28 10:39 ./ash -> ./busybox
rtr:[~]# ./ash
BusyBox v1.00-rc2 (2004.07.27-13:52+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
$ echo $PS1
\h:[\w]\$
$ PS1="\w \$ "
exit
rtr:[~]#
...
I'm running this under busybox 1.00-rc1 and the ./busybox is rc2, with the same
compile options ... It's as if it's not parsing the host and working directory,
etc. Any ideas? Or did I break something?
-- Fred
More information about the busybox
mailing list