Kickstart snippets post_install_network_config and REDHAT_REGISTER_SNIPPET are in wrong order leading to hostname/profilename set to 'unknown'
Issue
- If you try to kickstart a system by using a kickstart file generated directly by
cobbler system getksor accessing it via http://<stallite>/cblr/svc/op/ks/system/, the post_install_network_configsnippet gets replaced with a code to setup custom network options (which were either set throughcobbler system add/edit --hostname=... --mac=... --ip=...or inherited from existing system profile when we schedule the kickstart through WebUI), but this snippet is after callingrhnreg_ksso that hostname is not correctly set at time ofrhnreg_ksexecution and in conjunction with code logic inrhnreg_ksit leads to sending the unknown string as profilename and hostname to Satellite, becauserhnreg_kscode if it doesn't find any other name than localhost.localdomain (note that hostname is by default set to localhost.localdomain at the beginning of anaconda installation in RHEL4/5) after callinggethostname()or after obtaining HOSTNAME from/etc/sysconfig/network, it sets hostname/profilename to 'unknown'. - sets the cobbler hostname after calling
rhnreg_ks, which sends the hostname to the satellite so it cannot be correct
Environment
Red Hat Network (RHN) Satellite 5.4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
