[pups] Installing begemot
Greg 'groggy' Lehey
grog at lemis.com
Fri Aug 13 17:33:57 AEST 2004
On Friday, 13 August 2004 at 8:19:15 +0100, Robin Birch wrote:
> In message <Pine.BSI.4.05L.10408121627090.18049-100000 at moe.2bsd.com>,
> Steven M. Schultz <sms at 2BSD.COM> writes
>>
>> On Thu, 12 Aug 2004, Carl Lowenstein wrote:
>>
>>> iota: try 1109$ ./bad
>>> : bad interpreter: No such file or directory
>>> iota: try 1110$ cat bad
>>> #!/bin/sh
>>> date
>>> iota: try 1111$ od -c bad
>>> 0000000 # ! / b i n / s h \r \n d a t e \n
>>> 0000020
>>> iota: try 1112$
>>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>>
>>> Note that there is a '\r' character at the end of the #! line.
>>
>> And that's the cause of the problem. The kernel is scanning for
>> '\n' and when it finds the (unix) end-of-line character it then
>> tries to exec the program "/bin/sh\r" and fails.
>>
>> Was the original script created on a windoze box perhaps? Or was
>> a different method of getting a \r used? :)
>>
>> Cheers,
>> Steven Schultz
>>
> Hi Steve,
> Long time no chat.
>
> The scripts were tar'd off a Mandrake linux system then untar'd on a
> SuSE system. Something has got munged in the process I guess.
>
> What I'll do is a make really clean and then tr the whole thing to add
> \n instead of \r and start again.
Judging by the above, you want to remove the \r, not change them to
\n.
Greg
--
Note: I discard all HTML mail unseen.
Finger grog at lemis.com for PGP public key.
See complete headers for address and phone numbers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20040813/cdf6887b/attachment.sig>
More information about the TUHS
mailing list