[BusyBox] busybox login shell leading hyphen.

Tom Oehser tom at toms.net
Mon Jun 18 22:59:06 UTC 2001


> In detail: the bug comes from running a busybox applet as a login
> shell, like so:  sync::5:0::/:/usr/bin/sync
> 
> The error message: -sync: applet not found.

Joshua-

The login process rejiggers arg0 to start with a hyphen, read the docs for
ash or bash, you'll see they say 'if arg0 starts with a hyphen, it acts as
a login shell', so, login loads, i.e., "/bin/sh", but, jiggers arg0 to say
"-/bin/sh", or maybe "/bin/-sh", or maybe just "-sh", and, well, busybox
is using that arg0 for what to run, and doesn't find it.

Busybox-

Could busybox just drop a leading hyphen if one exists when looking up the
applet name, so that applets could be used as login shells?

-Tom








More information about the busybox mailing list