[comp.sys.ibm.pc.rt] AIX "csh" silently exits from csh scripts

dyer@arktouros.mit.edu (Steve Dyer) (02/24/89)

This may be a case of RTFM, but I've just confronted AIX in person
after many months of ACIS 4.2 and AOS 4.3, so be gentle.

Briefly, in attempting to port a large software product whose
installation scripts use the C-Shell, I'm finding that most of
them, when running under AIX, just exit without executing any commands.

Most of them begin with the convention "#! /bin/csh" which, although
probably not interpreted  directly by AIX, still should run OK
(either with the '#' acting as a semaphore as in the old days or
directly, by invoking 'csh scriptname').  However, they don't,
and "csh -v" and "csh -x" don't print out anything before exiting,
either.

I don't have a clue as to what is going wrong.  Any ideas?
Send mail and I will summarize.

---
Steve Dyer
dyer@arktouros.mit.edu
dyer@spdcc.com aka ...!{harvard,linus,ima,m2c,rayssd}!spdcc!dyer

dyer@arktouros.MIT.EDU (Steve Dyer) (02/25/89)

In article <9422@bloom-beacon.MIT.EDU> dyer@arktouros.mit.edu (Steve Dyer) writes:
>Briefly, in attempting to port a large software product whose
>installation scripts use the C-Shell, I'm finding that most of
>them, when running under AIX, just exit without executing any commands.

Just a few more details: we're running AIX 2.2.1, and the problem can
be better described as C-shell scripts invoked by their absolute
pathname work fine, but single component names fail silently.

I.e., if the file /tmp/foo contains
#!/bin/csh
echo foo

and is mode 755, owner root, the following all fail:
cd /tmp
foo
./foo
csh foo

but either of these succeed:

/tmp/foo
csh /tmp/foo
---
Steve Dyer
dyer@arktouros.mit.edu
dyer@spdcc.com aka ...!{harvard,linus,ima,m2c,rayssd}!spdcc!dyer

sauer@auschs.UUCP (Charlie Sauer) (02/25/89)

In article <9440@bloom-beacon.MIT.EDU>, dyer@arktouros.MIT.EDU (Steve Dyer) writes:
> In article <9422@bloom-beacon.MIT.EDU> dyer@arktouros.mit.edu (Steve Dyer) writes:
> >Briefly, in attempting to port a large software product whose
> >installation scripts use the C-Shell, I'm finding that most of
> >them, when running under AIX, just exit without executing any commands.
> 
> Just a few more details: we're running AIX 2.2.1, and the problem can
> be better described as C-shell scripts invoked by their absolute
> pathname work fine, but single component names fail silently.
> 
> I.e., if the file /tmp/foo contains
> #!/bin/csh
> echo foo
> 
> and is mode 755, owner root, the following all fail:
> cd /tmp
> foo
> ./foo
> csh foo
> 
> but either of these succeed:
> 
> /tmp/foo
> csh /tmp/foo

Steve,

I missed your initial posting.  I see it is on emx, which provides my feed, so
I wonder how I don't have it.  In any case, I've tried your example on 2.2.1
with update 1721 applied and don't see the problem, i.e., I created your
example as described, ran it as both root and guest and all 10 times (2 id's,
5 invocations) produced "foo" as desired.  I don't know offhand if csh was
changed in any of the updates to 2.2.1 (my guess is that you got 1722 when 
you got 2.2.1, but I don't know, of course). sum -r on my csh gives

16773   197 /bin/csh

If you have a different binary, we can try to explore it from that point of
view, otherwise, I assume this is symptomatic of other problems.  I use a few
csh scripts daily, some invoked by absolute path, e.g., /u/bin/errmail:

#!/bin/csh
set month = `date +%m`
set day = `date +%d`
set year = `date +%y`

(errpt -s ${month}${day}0000${year} \
	|& grep -v Diskette \
	|& grep -v tty \
	|& grep -v SNA \
	|& grep -v Tokenring_DLC;\
(echo 'Device             Mounted on            total     free  used     ifree  used';\
	df| grep /dev/hd))\
|& mail -s `uname -n` root

invoked at 2359 by cron, and, of course, which.csh lifted from 4.3/RT, which is
just invoked as which, and have not observed any such problems.

Charlie
-- 
C.H. Sauer IBM Advanced Workstations Div. !'s: cs.utexas.edu!ibmaus!sauer
           11400 Burnet Road, D75/802     @'s: @CS.UTEXAS.EDU:sauer@ibmaus.uucp
           Austin, Texas 78758-2502       !&@: ibmaus!sauer@CS.UTEXAS.EDU
           (512) 823-3692                vnet: SAUER at AUSVM6

skipster@skybird.UUCP (Skip Coppola/50000) (02/26/89)

I want to confirm that 4.3 will work on the 6150 just fine.

AIX 2.2 isn't all that bad though, and you should really try it first.
Andrew and some other things are only BSD, but more is available under
AIX, including support.


Skip Coppola
IBM AIX & AI Consultant

uunet!skybird!skipster

dyer@arktouros.MIT.EDU (Steve Dyer) (02/28/89)

In article <1840@auschs.UUCP> sauer@auschs.UUCP (Charlie Sauer) writes:
>I wonder how I don't have it.  In any case, I've tried your example on 2.2.1
>with update 1721 applied and don't see the problem, i.e., I created your
>example as described, ran it as both root and guest and all 10 times (2 id's,
>5 invocations) produced "foo" as desired.  I don't know offhand if csh was
>changed in any of the updates to 2.2.1 (my guess is that you got 1722 when 
>you got 2.2.1, but I don't know, of course). sum -r on my csh gives
>
>16773   197 /bin/csh
>

Sum -r on my csh binary gives:
26940	197	/bin/csh


I'm afraid I don't know much about what patches were or were not applied
or supplied.  Our diskettes (and uname) are labelled 2.2.1; I do not believe
there were any explicit patch disks.

It's obvious that at least with CSH, probably others, there is some divergence
here.  With any luck, it should explain the problem.
---
Steve Dyer
dyer@arktouros.mit.edu
dyer@spdcc.com aka ...!{harvard,linus,ima,m2c,rayssd}!spdcc!dyer