Ok Guys,
I humbly apologise for not working this out from day one :-)
The problem was that I'd mounted the device after fstab from the desktop and SuSE in this configuration appears to prevent shell scripts from being fired off. If I mount everything in fstab at boot time then it all works.
Don't know whether this is a general SuSE thing or whether it is just a "feature" of the version that I'm running (8.2).
Well, you live and learn don't you :-)
Chears and thanks for all of the advice, through which I learn't stuff so it wasn't all that bad.
Robin
> Date: Thu, 12 Aug 2004 18:49:11 +0100
> To: "Greg 'groggy' Lehey" <grog(a)lemis.com>
> From: Robin Birch <robinb(a)ruffnready.co.uk>
> Subject: Re: [pups] Installing begemot
> I have a different problem as well. There is something broken in the
> configuration of this computer!!!!! If I execute a shell file by going
> /bin/sh filename then it works ok but if I try running a shell script
> with #!/bin/sh in the first line I get a bad permission error. This is
> preventing me from running make scripts and all sorts of things. Any
> ideas?
Yes. See the following transcript of a session. I created a small
script named "bad" which just does "date" to show that it worked.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
iota: try 1107$ ls -l bad
-rwxrwxr-x 1 cdl cdl 16 Aug 12 15:56 bad*
iota: try 1108$ /bin/sh bad
Thu Aug 12 15:57:37 PDT 2004
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.
carl
--
carl lowenstein marine physical lab u.c. san diego
clowenst(a)ucsd.edu
In message <411BD929.4080009(a)sun.com>, Chris Drake <Chris.Drake(a)sun.com>
writes
>> The most curious one is a "bad interpreter" one. This is what I get
>>along with the permissions moan. But curiously if I run it sh
>>filename then all works.
>> It is as though there is some global shell permissions set up that
>>is munged.
>
>Hoo, you've got a weirdo, all right. Darn, I was hoping it was trivial.
>
>Bad interpreter: sounds like the first line where you select "the shell"
>is munched somehow. Officially, you can select any interpreter you want -
>but you gotta get the name right. :)
>
>More thoughts:
> - any problems with the pathname? Is it /bin/sh and nothing else?
> - check perms on /, /bin, and /bin/sh just in case something got
> zapped
> - what's your normal shell? How about it you change /bin/sh to
> the thing you run normally?
> - does anything follow the "sh" on the line? Like, perchance any
> strange nonprintable chars that might be interpreted as a part
> of the name or as a parameter to the shell?
> - try #!/bin/sh -x to see if you get any output from the script
> as it's run
> - do other scripts like one-liners work OK? Ie,
> #!/bin/sh
> echo hello world
> - any other messages?
>
>Just saw Warren's email, and he has a few good ones as well - like, what are
>you running on? :)
>
> - Chris
>
Hi Chris,
See my reply to Warren. I'll try this all tomorrow, the system is in
work.
Cheers
Robin
--
Robin Birch
Hi All,
Well I know it's been quiet for ages on this but hopefully someone is
listening.
I've just started to put P11 on a new Linux box and am having problems
building begemot. It keeps blowing out when compiling panic. Is there
a more recent version or are there some obvious patches I can do.
Regards
Robin
--
Robin Birch
Hi all!!!
While educating people some unix stuff (at time, spare from work as
admin), I have a need for making some simple UNIX-like environment for
people to try to type some simple commands. Now I need to make it possible
to do it remotely. Are there any emulators, that are capable to run V5/6/7
or (better) 4.2BSD, and accessible by telnet or something like that?
Additional thing I need is vi, any emulator that is capable of
running vi could make me happy!!!
Emulation is needed because of unlimited virtualization possibility,
unlimited variation of configurations, and, of course, zero time for
recover after root errors. simh runs fast 60 instances on P233.
But now I need vi :(
Thanks a lot!
S.
In message <411BBDD3.3050400(a)sun.com>, Chris Drake <chris.drake(a)sun.com>
writes
>I'd be interested in seeing your results and final analysis for begemot.
>I tried (briefly) getting it to run and gave up. Post 'em!
>
>> I have a different problem as well. There is something broken in the
>>configuration of this computer!!!!! If I execute a shell file by
>>going /bin/sh filename then it works ok but if I try running a shell
>>script with #!/bin/sh in the first line I get a bad permission error.
>
>Starting with the simplest possibility -- if you run "sh filename", all
>you need are read permissions on the file. If you run "filename" with the
>#!/bin/sh in the first line, the filename itself needs to have execute
>permissions enabled.
>
>Try chmod a+x filename and see if that helps.
>
>If that's not the issue, then more detail on the error message would be
>good. There are tons of different messages and if you don't get the exact
>right one when you're trying to debug, you can go down lots of wild rat
>holes...
>
> - Chris
>
Hi Chris,
The most curious one is a "bad interpreter" one. This is what I get
along with the permissions moan. But curiously if I run it sh filename
then all works.
It is as though there is some global shell permissions set up that is
munged.
Robin
--
Robin Birch
In message
<7AD18F04B62B7440BE22E190A3F772140F6047(a)mwsrv04.microwalt.nl>, Fred N.
van Kempen <Fred.van.Kempen(a)microwalt.nl> writes
>> I have a different problem as well. There is something broken in the
>> configuration of this computer!!!!! If I execute a shell
>> file by going
>> /bin/sh filename then it works ok but if I try running a shell script
>> with #!/bin/sh in the first line I get a bad permission
>> error. This is
>> preventing me from running make scripts and all sorts of things. Any
>> ideas?
>Make sure the scripts have mode 0755 (or 0555, or whatever, as
>long as you have both read AND execute perm on the file...
>
>--f
Done that. What happens is that sometimes I get a permissions complaint
but sometimes I get a "bad interpreter" message. If I execute the shell
with the file name as a parameter then it all works. I'm stumped.
Robin
--
Robin Birch
Hi, all!!!
Still trying to implement multi-user unix-learning environment.
So, I run simh with Quasijarus, when I telnet to port, that is redirected
from serial, it automatically picks up unused line, that is fine, and
eleminates a need for reconfiguration.
But there is something interesting: I want to implement possibility to
allow outgoing connections from emulated VAX. As I understand, 4.3BSD
supports SLIP protocol. And I can get SLIP working through emulated serial
line. So, the problem is:
1. How it was used to setup SLIP lines in 4.3BSD? :)
2. The other end - will slirp package work in such case?
All the best, and thanks for all help,
S.