Adding bash support to hush: the todo list.

Matthew Stoltenberg d3matt at gmail.com
Mon May 17 02:55:54 UTC 2010


On Sun, May 16, 2010 at 7:49 PM, Rob Landley <rob at landley.net> wrote:
> So Gentoo's portage requires bash (not just bash, but bash 3.x), and I'm
> trying to get it to work with busybox.  At least the following would need to
> be done to get hush to act as something like a bash replacement:
>
> 1) Allow "bash" alias to call hush, so #!/bin/bash to redirect to hush.

diff -ru busybox-1.16.1/include/applets.h busybox-1.16.1.bash/include/applets.h
--- busybox-1.16.1/include/applets.h	2010-03-28 12:43:35.000000000 -0500
+++ busybox-1.16.1.bash/include/applets.h	2010-05-16 21:36:00.000000000 -0500
@@ -189,6 +189,7 @@
 IF_HOSTNAME(APPLET(hostname, _BB_DIR_BIN, _BB_SUID_DROP))
 IF_HTTPD(APPLET(httpd, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
 IF_HUSH(APPLET(hush, _BB_DIR_BIN, _BB_SUID_DROP))
+IF_HUSH(APPLET_ODDNAME(bash, hush, _BB_DIR_BIN, _BB_SUID_DROP, hush))
 IF_HWCLOCK(APPLET(hwclock, _BB_DIR_SBIN, _BB_SUID_DROP))
 IF_ID(APPLET(id, _BB_DIR_USR_BIN, _BB_SUID_DROP))
 IF_IFCONFIG(APPLET(ifconfig, _BB_DIR_SBIN, _BB_SUID_DROP))

Is there any more work involved than that one line?  Did a simple
chroot test and it seems to have worked.

Matt


More information about the busybox mailing list