Greetings,

For some time now I've been confused about how certain xCAT postscripts 
test for the Linux distro in which they are running.

Some xCAT postscripts test the value of $OSVER AND test for the 
existence of release files.  For example, consider the following code 
from syslog:

    if ( pmatch $OSVER "sles*" ) || ( pmatch $OSVER "suse*" ) || [ -f 
/etc/SuSE-release ]; then

Tracing through all the scripts involved in executing postscripts on a 
provisioned stateful node, I am aware that the postscripts are run in 
the context of larger scripts, named mypostscript or mypostscript.post, 
that are built from information mostly residing in the MN's site table.  
The information from the site table is put into mypostscript and 
mypostscript.post as the values of environment variable settings.  One 
of the environment variables set is OSVER.  Realizing this, my confusion 
was reduced to, "why is the existence of release files being tested?  
The test of OSVER should be good enough".

I recently realized that there is at least one postscript that is 
executed in a different environment.  In addition to being run on a 
provisioned node in the standard fashion, the syslog postscript is run 
on the management node when xcatconfig is executed.  Experimentation led 
to the understanding that when run in this environment, OSVER (and the 
other environment variables used by postscripts) is not set at all.  
Mystery solved... the syslog script must test for the release files in 
order to behave correctly when the syslog postscript is run on the MN.  
This is really subtle.  Did I miss some documentation about this somewhere?

I am currently only aware of the syslog postscript being run in a 
"non-standard" postscript environment.  Does this happen with other 
postscripts, and in what context?

Grep'ing through the postscripts reveal four other scripts that test for 
the existence of Linux distro release files.  They are configeth, 
hardeths, setbootfromdisk, and setupntp.
Are these scripts also run in some "non-standard" environment that 
necessitate looking for release files, or should they just be testing 
the value of OSVER?

Any information on these points would be greatly appreciated.

Eric Agar


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user

Reply via email to