[BusyBox] Proposed fix for ash standalone shell

Erik Andersen andersen at codepoet.org
Wed Mar 17 13:52:49 UTC 2004


On Wed Mar 17, 2004 at 02:53:41PM +0300, Vladimir N. Oleynik wrote:
> Erik,
> 
> >This patch from Herbert Pötzl should fix it so standalone shell
> >will prefer external commands when
> >CONFIG_FEATURE_SH_STANDALONE_SHELL is enabled, and make it so
> >internal applets are preferred when
> >CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN is enabled.  The current
> >behavior is wrong, since it currently always prefers builtins
> >applets over external commands.
> >
> >http://vserver.13thfloor.at/Experimental/busybox_fix-01.diff
> >
> >The patch looks good to me. 
> 
> For me - not.
> for shellexec() added builit variable. But not used.

Yes, that part is clearly garbage.

> Its patch full equivalent work as current version (first examine),
> may be generated to not busybox version, partialy corrected previous 
> version.

Using /bin/ls from from GNU coreutils, and using current
busybox ash compiled with:

	CONFIG_FEATURE_SH_STANDALONE_SHELL=y
	# CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN is not set

Before applying the patch:

	$ ./busybox ash
	$ which ls
	/bin/ls
	$ ls --version 2>&1 | head -n2
	ls: invalid option -- -
	BusyBox v0.60.5 (2003.10.16-19:02+0000) multi-call binary

After applying the patch behavior is correct:

	$ ./busybox ash
	$ which ls
	/bin/ls
	$ ls --version 2>&1 | head -n2 
	ls (coreutils) 5.0.91
	Written by Richard Stallman and David MacKenzie.

But there is still a problem with properly running applets when
no matching binary is present on the filesystem.  Working on it.

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the busybox mailing list