Operating System - HP-UX
1834272 Members
1729 Online
110066 Solutions
New Discussion

chbootptab tool strange behavior

 
SOLVED
Go to solution
john tracey
New Member

chbootptab tool strange behavior

One of my customer's sent me this question:

I've discovered some strange behavior with the chbootptab tool and I'm curious to know if this is intended functionality or if there's an updated version of chbootptab that eliminates this problem.

The command I'm using is:
/usr/sam/bin/chbootptab n=machinename 'ht=ethernet' 'ha=00306EE98FD5' 'ip=155.65.229.213' 'bf=/opt/ignite/boot/nbp.efi' 'sm=255.255.255.128'

If "machinename" is the first entry in /etc/bootptab, then chbootptab deletes all the comments at the beginning of the file!!! If machinename is not the first entry or if it is a new entry, chbootptab behaves nicely. The comments are very helpful in understanding the file and I'd rather not accidentally delete them when I use chbootptab in my scripts.

The help for chbootptab does not describe this ugly side effect or any workarounds (/usr/sam/bin/chbootptab --help). Do you have any suggestions?

I am waiting to hear back on the version she is using.
1 REPLY 1
Jeff Schussele
Honored Contributor
Solution

Re: chbootptab tool strange behavior

Hi John,

What are the perms on the /etc/bootptab file?
They should be 444 ( -r--r--r-- )

Comments - and I assume they're using # - as well as blank lines are supposed to be ignored.
It's possible that there are NO newlines between the comments & the first entry. It's mandatory that the first field by the machine name. Scroll right on that first line of comments & if it keeps going on until the first machine name, then there's your problem
If all above checks out then check the perms & remove any write rights & if still does it, I'd move the comments to the end of the file.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!