[cobbler] Run command from the server

James Cammarata jimi at sngx.net
Tue Mar 12 16:21:31 UTC 2013


On Tue, Mar 12, 2013 at 8:38 AM, Personal Técnico <tecnicos at caos.uab.es>wrote:

>  Yes, my kickstart file includes a $SNIPPET('kickstart_done'):
>
> [...]
> %post
> $SNIPPET('log_ks_post')
> # Start yum configuration
> $yum_config_stanza
> # End yum configuration
> $SNIPPET('post_install_kernel_options')
> $SNIPPET('post_install_network_config')
> $SNIPPET('func_register_if_enabled')
> $SNIPPET('puppet_register_if_enabled')
> $SNIPPET('download_config_files')
> $SNIPPET('koan_environment')
> $SNIPPET('redhat_register')
> $SNIPPET('cobbler_register')
> # Enable post-install boot notification
> $SNIPPET('post_anamon')
> # Start final steps*
> **$SNIPPET('kickstart_done')*
> # End final steps
>
> # Testing new config
> service postfix stop
> chkconfig postfix off
> sed -i '/^server/d' /etc/ntp.conf
> echo "server myntpserver" >> /etc/ntp.conf
> mkdir /SRC
> mkdir /soft
> echo "myNFSserver:/SRC/SL-6.3      /SRC            nfs
> defaults,noauto        0 0" >> /etc/fstab
> echo "myNFSserver:/soft/SL-6.3     /soft           nfs     defaults
> 0 0" >> /etc/fstab
> mount /soft
> $SNIPPET('adding_SSH_key')
> # End testing new config
>
>
> So, with this kickstart file, what is the problem?
>

The kickstart_done snippet should be the last thing in the %post section.
In your case, you're adding the SSH key after the kickstart_done snippet is
run, so that may be the issue - you're running into a race condition.

Move the kickstart_done down under the last part, and re-test. You can
always test using wget to trigger the post install events, which should
work even after the system reboots for the first time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/cobbler/attachments/20130312/b2785d0e/attachment.html>


More information about the cobbler mailing list