Hi Alan,
Under the directory /var/lib/cobbler/triggers, I have the following directories:
add
change
delete
install
sync
If a post-install script where to be executed on the client that has just been
built using Cobbler, where would I put the script? I would imagine it would be
placed under install/firstboot – is this correct?
Regards,
Wadud.
From: cobbler-devel-boun...@lists.fedorahosted.org
[mailto:cobbler-devel-boun...@lists.fedorahosted.org] On Behalf Of Alan
Evangelista
Sent: Wednesday, July 01, 2015 8:33 PM
To: cobbler-devel@lists.fedorahosted.org
Subject: Re: [cobbler-devel] Cobbler Python API
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
___
This message is for information purposes only, it is not a recommendation,
advice, offer or solicitation to buy or sell a product or service nor an
official confirmation of any transaction. It is directed at persons who are
professionals and is not intended for retail customer use. Intended for
recipient only. This message is subject to the terms at:
www.barclays.com/emaildisclaimer.
For important disclosures, please see:
www.barclays.com/salesandtradingdisclaimer regarding market commentary from
Barclays Sales and/or Trading, who are active market participants; and in
respect of Barclays Research, including disclosures relating to specific
issuers, please see http://publicresearch.barclays.com.
___
___
cobbler-devel mailing list
cobbler-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/cobbler-devel