Solaris10 Command history in $HISTFILE

Solaris 10 Experts

Recently we upgraded our Solaris8 boxes to Solaris 10 ( all except our nfs box which is still Sol8). I have noticed that on the Sol10 boxes the command history is being written to $HOME/.sh_history instead of $HOME/$HISTFILE in a particular scenario.

==== This is what I have in .profile ( home dir is nfs mounted )====

export HISTFILE="$HOME/.history.`logname`"

export HISTSIZE=2000

We use op command to login as the applicatin id. Here are the sequence of events that will give a better understanding of the problem

e.g my id is "jsmith", application id is "catprod", app is a distributed application on "app1", "app2" , one nfs box "appnfs" and one dbbox "appdb".

1. Login to box app1( Solaris 10)

2. op in as the application id

3. HISTFILE is .history.myid

( no issues so far , commands are written to the above file as expected )

4. ssh to box app2 (Solaris 10)

5 HISTFILE is .history.catprod

( But the commands are always beting written to $HOME/.sh_history file)

6. ssh to box appnfs ( Solaris 8)

7. HISTFILE is .history.catprod

( no issues , commands are always written to the above file as expected )

We have the same application running in a UAT environment on Solaris 8 boxes. No issues here always writes to whatever $HISTFILE points to.

My Questions:

Why is not always writing to whatever $HISTFILE points to?

Is this because of the home directory mounted from a nfs box which is on Solaris8.?

Any pointers will be greatly appreciated. Thanks for your valuable time in advance.

[1646 byte] By [sahu@javaa] at [2007-11-27 0:28:10]
# 1
We just found that if I invoke another shell after I log in it starts to write to the file whatever $HISTFILE points to.A workaround may be, but not a acceptable solution.
sahu@javaa at 2007-7-11 22:28:53 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 2
Perhaps you are using the bourne-shell (/sbin/sh or /bin/sh) at certain points? I don't think that bourne-shell honours the $HISTFILE setting. .7/M.
mAbrantea at 2007-7-11 22:28:53 > top of Java-index,Solaris Operating System,Solaris 10 Features...