Operating System - HP-UX
1757080 Members
2706 Online
108858 Solutions
New Discussion юеВ

post configuration commands

 
SOLVED
Go to solution
jamesps
Regular Advisor

post configuration commands

I tried setting up some post configuration commands to be executed after my client is ignited. The "ignition" process is successful, no problem here. The problem is the post_config_cmd:
-if I put it in /var/opt/ignite//config.full then at the next ignite the line is gone, obviously this file is rebuilt from somewhere else

-I tried putting it into /vat/opt/ignite/config.local but nothing is executed

-I also tried the /var/opt/ignite//config but same result, not executed :(

My post_config_cmd commands only do a few simple echoes to mailx to mail out some data.

How can this be done properly?

Thanks,
james
8 REPLIES 8
Marvin Strong
Honored Contributor
Solution

Re: post configuration commands

Well where I put mine is in the INDEX on the ignite server. then I just select the one I want to run. While I go through the ignite process.

my entry in /var/opt/ignite/INDEX is as follows.

very bottom of the file:

scripts {"/path/post_script"}

another way to do it. is to add

post_script += script

to your core cfg that you use.

jamesps
Regular Advisor

Re: post configuration commands

Would I be able to use the CINDEX for that? I will have individual post config cmds for each of my clients. Do you think that would work?
Thanks!
james
Marvin Strong
Honored Contributor

Re: post configuration commands

It might not sure never used the CINDEX before, I just have everything setup as a golden image, and a few scripts to select from. Since I dont have it fully automated yet.

config.local should have ran your post script if you used the correct syntax.

did you have

post_config_script += script

I believe most configurations in INDEX use config.local.

You might have to put some logic into the config.local for each of your clients.

for example:

(HARDWARE_MODEL ~ 9000/800/L3000") {
post_config_script += lpost } else { post_config_script += rppost }

not 100% sure if my syntax is correct there.

You might want to search docs.hp.com for the ignite manual.

jamesps
Regular Advisor

Re: post configuration commands

I did check the manualsm the forums, all the doc I could find but still unclear. I find this option to be described poorly in the manual.

Can you add subsequent post_config_cmd+=... commands or you must specify a script to execute? Is this going to be executed at the very end?

Thanks,
james
Marvin Strong
Honored Contributor

Re: post configuration commands


You can do the following

post_config_cmd += "
list
cmds
here"
example:
post_config_cmd += "
/usr/sbin/ch_rc -a -p NFS_SERVER=0
/usr/sbin/ch_rc -a -p NFS_CLIENT=1
/usr/sbin/cp /etc/nsswitch.files /etc/nsswitch.conf"

They do run last from my knowledge.
jamesps
Regular Advisor

Re: post configuration commands

Seen those. I tried put them in config.full. The got deleted after the ignite process ended. I still cannot figure this out. Going through the manuals didn't help so far.
If I use a post_script then this will have to go in an INDEX and I will probably have to use manage_index to put them there, etc.
I would like to use the post_config_cmd but I don;t know where to put it. Tried config, config.local, config.full, control_cfg. No success :(

james
Marvin Strong
Honored Contributor

Re: post configuration commands

the ignite process overwrites the client config everytime thats why anything you put in those files are lost.

config.local is probably the correct place.

making sure your INDEX is correct and logic is correct in config.local is the challenge.

Are the customizations hardware specific? or selection specific?

Marvin Strong
Honored Contributor

Re: post configuration commands

http://docs.hp.com/en/B2355-90875/B2355-90875.pdf


That should be a link to the Ignite Administrators Guide in pdf form. start at page 154 it covers customized installations with post scripts etc..