Operating System - HP-UX
1748239 Members
3680 Online
108759 Solutions
New Discussion юеВ

Re: Ignite: passing variables to scripts

 
Brian Kennedy
Occasional Advisor

Ignite: passing variables to scripts

Hi admins:

Consider this configuration file for Ignite:
--snip--
# Adding Ignite's additional configuration controls

_OND_PROJECT = {
"BM",
"SMS"
}
_OND_PROJECT help_text "Reference platform project"
init _OND_PROJECT = "SMS"
_OND_PROJECT visible_if (sw_sel "OND reference platform archive")

init _OND_REF_PLAT = ""
_OND_REF_PLAT help_text "Reference platform name"
_OND_REF_PLAT visible_if (sw_sel "OND reference platform archive")

# Defining customization

sw_source "OND reference platform archive" {

description = "OND reference platform archive"
source_format = CMD

post_config_script += ${_OND_INSTALL_PATH}+"/scripts/ref_plat/custom/ref_plat_archive_creation.post_config"
# post_config_script += ${_OND_INSTALL_PATH}+"/scripts/common/make_sys_image -d /mnt/ref_plat -s local -n "+${system_name}+".gz -w /mnt/ref_plat/"+${system_name}+".log -m t -c g -l 2 -u -v"
final_script += ${_OND_INSTALL_PATH}+"/scripts/ref_plat/custom/ref_plat_archive_creation.final"

load_order = 5
}

sw_sel "OND reference platform archive" {

description = "OND scripts for reference platform archive creation"

sw_source = "OND reference platform archive"
sw_category = "OND"

exrequisite = "OND generic archive"
}

(sw_sel "OND reference platform archive") {

(_OND_PROJECT ~ "^[A-Za-z0-9_.-]+$") {
note += "OND project name validated."
env_vars = "_OND_PROJECT="+${_OND_PROJECT}
} else {
error += "OND project name contains one or more invalid characters. Installation cannot proceed."
}

(_OND_REF_PLAT ~ "^[A-Za-z0-9_.-]+$") {
note += "OND reference platform name validated."
env_vars = "_OND_REF_PLAT="+${_OND_REF_PLAT}
} else {
error += "OND reference platform name contains one or more invalid characters. Installation cannot proceed."
}
}

--snip--
This config file adds two controls in the 'Additional parameters' screen if ever user selects the sw_sel in the Software tab.

Now I check the syntax of variable _OND_REF_PLAT to make sure user has renamed it.
Once user has renamed it, I validate it and I would like to set the env_var _OND_REF_PLAT to it.

But Ignite does not change it once it has been initially set to ''...

I don't know how to set an additional parameter and pass it to an env_var once it has been modified, to make sure that my post_config scripts can use it.

Any idea?

Thanks!

/Brian
3 REPLIES 3
Brian Kennedy
Occasional Advisor

Re: Ignite: passing variables to scripts

I finally resolved my problem!
No need to answer.

I did not enclosed init keywords at the right place.

Regards,

/Brian
Chuck J
Valued Contributor

Re: Ignite: passing variables to scripts

Oh, and i was hoping for 10 points :-) haha.

Chuck J
Brian Kennedy
Occasional Advisor

Re: Ignite: passing variables to scripts

Next time ;o)

Cheers.

/Brian