You can use "prescripts" to do stuff on the MGMTNODE.
Create /install/prescripts and put your code in there.
Then set the "prescripts" in the prescripts table (or use osimage).
They can be run either at the beginning or end of the action.
See the man page for prescript table.

xCAT will pass the list of affected nodes to the script as a comma-
separated list. Something like this will work:

#!/bin/bash
for h in ${NODES//,/ }; do
  logger -t xCAT -p local4.info "Doing something useful for host $h"
  /usr/local/bin/do_something $h
  [ $? -ne 0 ] && logger -t xCAT -p local4.info "FAILED doing something
for host $h !!"
done

exit 0





On Fri, 2017-02-03 at 22:58 +0100, Christopher J. Walker wrote:
> I'd like to get rinstall to trigger other commands from the
> management 
> node. Is this possible?
> 
> I'd like to do this before the install - to clean puppet certs for
> example.
> 
> Chris

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
xCAT-user mailing list
xCAT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xcat-user

Reply via email to