Script Error with Installcluster

I have this script I use for installing solaris 10 updates, and so far it's worked on every solaris 10 server except one. I get an error: "Unrecognised script interpreter"
I believe it's this part of the scirpt that cuases the problem but not sure what to do with it

 /usr/bin/pargs -l $$ 2> /dev/null | /usr/bin/egrep "^/usr/bin/(k|pfk|rk)sh" > /dev/null || {
    echo "ERROR: Unrecognised script interpreter."
    return 1 2> /dev/null
    exit 1

I suspect it's something to do with the shell environment just not sure how to fix it. thanks.

The error message is printed, when the user runs another shell than some sort of ksh. Maybe the user is using bash or maybe the shell is configured with a path like "/bin/ksh". This is possible, because /bin is just a symbolic link to /usr/bin.

Run

pargs -l $$

on the server in question and then modifiy the egrep pattern accordingly.

I ran the code, it seems to be pointing to /usr/bin/ksh

# pargs -l $$
/usr/bin/ksh

I'm not sure what you mean by modify the egrep pattern?

Thats odd, the error message should be printed only if the shell is not one of /usr/bin/ksh, /usr/bin/pfksh or /usr/bin/rksh.

What happens if you rephrase the if condition to

if [ -z `/usr/bin/pargs -l $$ 2> /dev/null | /usr/bin/egrep "^/usr/bin/(k|pfk|rk)sh" ` ] && {
   ...

Maybe I could just comment out that whole line?
I'll have to schedule a time to do this. Tuesday is my maintenance window.

It's weird because I've ran this on a bunch of servers and haven't had any issues.

If you comment out the if clause, don't forget to comment out everything up to the closing curly bracket. Check on a test system, so that you do not run into syntax errors.
Or even better, make it something like

# /usr/bin/pargs -l $$ 2> /dev/null | /usr/bin/egrep "^/usr/bin/(k|pfk|rk)sh" > /dev/null || {
true || {
   ...