Operating System - HP-UX
1833894 Members
1846 Online
110063 Solutions
New Discussion

Re: NFS startup scripts returns a wrong code

 
SOLVED
Go to solution
Jdamian
Respected Contributor

NFS startup scripts returns a wrong code

Hi

I disabled both NFS client and server in my box. But when the system boots up it shows both NFS client and server have been started fine (OK).

I realized that the exit status is 0 despite of value assigned to variables in /etc/rc.config.d/nfsconf.

The script /sbin/init.d/nfs.server has the following lines:

if [ "$NFS_SERVER" -ne 1 ];then
echo NFS_SERVER not set to one in /etc/rc.config.d/nfsconf, exiting.
exit 0
fi

I think the exit code should be 2 according to manual pages rc(1M).

Will this report be taken in account next time a NFS patch is released or will it be sent to "recycle bin" ?

I'm fed up of changing these scripts after installing NFS patches in all my boxes.
2 REPLIES 2
Elmar P. Kolkman
Honored Contributor
Solution

Re: NFS startup scripts returns a wrong code

You are right about the wrong exit code from the script, but does it really matter if it results in an OK instead of N/A ?

If you want this fixed I think you need to report this directly to HP, not this forum.
Every problem has at least one solution. Only some solutions are harder to find.
Brian Hackley
Honored Contributor

Re: NFS startup scripts returns a wrong code

Hello,

I've seen this when people make a copy of nfsconf in /etc/rc.config.d
When you do this, remember that the HP-UX startup scripts source all the files in /etc/rc.config.d/, so if you have a copy of nfsconf like nfsconf.orig, whatever value is there will be the last one referenced, and therefore the behavior you see with the NFS functionality not being disabled.

Moral of the story, keep your backup files in another director, e.g. /etc/rc.config.old.d

Hope that helps,
-> Brian Hackley
Ask me about telecommuting!