WM> Is the post-install script executed on the
installed host (client) or on the Cobbler server?
The post-installation scripts in cobbler/modules/ run in the
Cobbler server, the post-installation
snippets run in the automated installation file (eg kickstart,
autoyast, preseed) are run in the
client.
WM> If the script is executed on the installed host (client) is
there a function that returns the current hostname when the post
install script is executed on the installed host? I know I could
obtain that from the $HOSTNAME environment variable, but I prefer
to use the API.
You can get the hostname attribute assigned in a Cobbler system
using the get_system() remote call in XML-RPC interface. The
system name parameter in this remote call may be set with the
system_name template variable value, automatically available in
any snippet. Given you will run this in the client, I do not
understand why you prefer to do a remote call to obtain the
hostname than getting it directly in the system, though.
Regards,
Alan Evangelista