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

List:       busybox
Subject:    [BusyBox] bug#1212: Busybox: ash builtins don't work?
From:       urchlay () linuxgeneral ! com
Date:       2001-08-28 13:15:03
[Download RAW message or body]

Package: busybox
Version: 0.60.1

Hi

I've just compiled busybox 0.60.1 with ash (and none of the
other shells)

I defined BB_FEATURE_SH_STANDALONE_SHELL in Config.h, which
the comments tell me will allow the shell to run all the
builtin commands.

Perhaps I'm making wrong assumptions or mis-read the docs, but
shouldn't I be able to set PATH="" and still run the builtin
commands? Here's what it looks like when I try:

	<urchlay@allevil:~/busybox-0.60.1>$  ./busybox ash
	
	
	BusyBox v0.60.1 (2001.08.28-17:30+0000) Built-in shell (ash)
	Enter 'help' for a list of built-in commands.
	
	$ ls
	<output of ls removed...>
	
	$ unset PATH
	$ ls
	ls: No such file or directory
	$ builtin ls
	ls: not found
	$ help 
	
	Built-in commands:
	-------------------
	<output removed. ls is in the list, though>
	
	$ exit
	
	ls: No such file or directory
	$ builtin ls
	ls: not found
	$ help 
	
	Built-in commands:
	-------------------
	<output removed. ls is in the list, though>
	
	$ exit

..I would have expected at least the second attempt (`builtin ls') to
work..

Am I just doing something wrong? The man page doesn't say anything
about this...

I'm on Slackware 7.0 with a 2.2.19 kernel, using GNU libc-2.1.3

I also tried it with BB_FEATURE_SH_APPLETS_ALWAYS_WIN defined, but that
didn't seem to make a difference... Well, it does do what it's supposed
to do (calls the built in ls rather than /bin/ls when I just type ls),
but if /bin isn't in my PATH, the builtin ls doesn't run, which to me
seems like even weirder behavior...

I'm about to try it with a different shell (lash or msh) rather than ash,
and see if that works. I chose ash in the first place because I have a
standalone version of it, wanted to compare behaviors.

Hopefully I'm just being stupid, and this isn't a real bug... Thanks
for writing such an excellent program!

B. Watson
Development Department
Linux General Store

P.S. Here are the modifications I made to the stock Config.h and Makefile.

------begin Config.h.diff---

12c12
< //#define BB_ASH
---
> #define BB_ASH
21c21
< //#define BB_CMP
---
> #define BB_CMP
26c26
< //#define BB_DC
---
> #define BB_DC
54c54
< //#define BB_HOSTNAME
---
> #define BB_HOSTNAME
57c57
< //#define BB_IFCONFIG
---
> #define BB_IFCONFIG
59c59
< //#define BB_INSMOD
---
> #define BB_INSMOD
69c69
< #define BB_LOGGER
---
> //#define BB_LOGGER
74c74
< //#define BB_MD5SUM
---
> #define BB_MD5SUM
84c84
< #define BB_MSH
---
> //#define BB_MSH
87,88c87,88
< //#define BB_NC
< //#define BB_NSLOOKUP
---
> #define BB_NC
> #define BB_NSLOOKUP
90,92c90,92
< //#define BB_PING
< //#define BB_PIVOT_ROOT
< #define BB_POWEROFF
---
> #define BB_PING
> #define BB_PIVOT_ROOT
> //#define BB_POWEROFF
103,104c103,104
< //#define BB_RMMOD
< //#define BB_ROUTE
---
> #define BB_RMMOD
> #define BB_ROUTE
110c110
< //#define BB_STTY
---
> #define BB_STTY
116c116
< //#define BB_TEE
---
> #define BB_TEE
118,119c118,119
< //#define BB_TELNET
< //#define BB_TFTP
---
> #define BB_TELNET
> #define BB_TFTP
121,122c121,122
< //#define BB_TR
< //#define BB_TRACEROUTE
---
> #define BB_TR
> #define BB_TRACEROUTE
134c134
< //#define BB_VI
---
> #define BB_VI
137c137
< //#define BB_WGET
---
> #define BB_WGET
157c157
< #define BB_FEATURE_SH_IS_MSH
---
> #define BB_FEATURE_SH_IS_ASH
182c182
< //#define BB_FEATURE_VERBOSE_USAGE
---
> #define BB_FEATURE_VERBOSE_USAGE
245c245
< //#define BB_FEATURE_NFSMOUNT
---
> #define BB_FEATURE_NFSMOUNT
275c275
< //#define BB_FEATURE_COMMAND_USERNAME_COMPLETION
---
> #define BB_FEATURE_COMMAND_USERNAME_COMPLETION
281c281
< //#define BB_FEATURE_SH_STANDALONE_SHELL
---
> #define BB_FEATURE_SH_STANDALONE_SHELL
305c305
< //#define BB_FEATURE_NEW_MODULE_INTERFACE
---
> #define BB_FEATURE_NEW_MODULE_INTERFACE
320c320
< //#define BB_FEATURE_MINIX2
---
> #define BB_FEATURE_MINIX2
323c323
< //#define BB_FEATURE_IFCONFIG_STATUS
---
> #define BB_FEATURE_IFCONFIG_STATUS
329c329
< //#define BB_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
---
> #define BB_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
332c332
< //#define BB_FEATURE_IFCONFIG_HW
---
> #define BB_FEATURE_IFCONFIG_HW
336c336
< //#define BB_FEATURE_IFCONFIG_BROADCAST_PLUS
---
> #define BB_FEATURE_IFCONFIG_BROADCAST_PLUS
341c341
< //#define BB_FEATURE_INSTALLER
---
> #define BB_FEATURE_INSTALLER
367c367
< //#define BB_FEATURE_GREP_CONTEXT
---
> #define BB_FEATURE_GREP_CONTEXT
370c370
< //#define BB_FEATURE_GREP_EGREP_ALIAS
---
> #define BB_FEATURE_GREP_EGREP_ALIAS
------end Config.h.diff---

------begin Makefile.diff

36c36
< DOSTATIC = false
---
> DOSTATIC = true
52c52
< USE_SYSTEM_PWD_GRP = true
---
> USE_SYSTEM_PWD_GRP = false
------end Makefile.diff---






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

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