>First, whoever implements the "[ -x /bin/tcsh ]" *knows*, in advance,
>that that is where the shell is, and that it is executable. -x is just
> a sanity test, in order to be able to adapt to circumstances as much
>as possible.

In those cases that the dynamic linker failed (corrupted or no libraries)
on Solaris 9, the profile entry would possibly cause a successful exec
but tcsh would then immediately die.  Root would then be kicked out again.

You can use something like:

        if [ -x /bin/tcsh ] && /bin/tcsh -f /dev/null
        then
                exec /bin/tcsh
        fi

Test for the presence of the shell, make it execute an empty script
and if that all works, start the shell in earnesst.

You can't know whether something will run until you run it.

Casper
_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to