[BusyBox] init difficulties

Steven P Valliere bb at e-visions.com
Thu Oct 9 12:16:58 UTC 2003


If anyone cares, it turned out that most of my
init script problems were due to the fact that
the shell apparently treats some invisible/
non-printable control characters as valid file
(and/or directory) name characters and consequently
was unable to find some things because some invisible
junk was glommed onto the end of the lines.

I retyped the entire scripts (using ed directly on
my target machine) and they work fine now.  Sigh.

I have some comments/thoughts for developers:

1. I cannot think of any time that one SHOULDN'T
   remove trailing whitespace from input lines --
   whether from the command line itself or when
   reading a script.

2. Why would ANY character < 0x20 (space) be valid
   in a file or directory name?

3. Error messages that actually mean something
   would also be a HUGE help.  For example, when
   ash tried to execute a script but there was
   invisible garbage at the end of #!/bin/sh it
   simply reported 'File not found' (or something
   to that effect) implying that the SCRIPT was
   not found.  It REALLY should show the name of
   the file it was looking for.  And insmod was
   reporting .o: module cannot be located (or
   again, something similar).  Needless to say,
   I didn't have a single entry reading 'insmod .o'
   to the error was much less than helpful.  In
   fact, the error stripped the filename itself AND
   the trailing garbage -- which would've instantly
   illustrated the problem.

OK, I'll shut up now.
Not that anyone's listening anyway.

-- 
Steve Valliere




More information about the busybox mailing list