Kickstart snippets post_install_network_config and REDHAT_REGISTER_SNIPPET are in wrong order leading to hostname/profilename set to 'unknown'

Solution Verified - Updated -

Issue

  • If you try to kickstart a system by using a kickstart file generated directly by cobbler system getks or accessing it via http://<stallite>/cblr/svc/op/ks/system/, the post_install_network_config snippet gets replaced with a code to setup custom network options (which were either set through cobbler system add/edit --hostname=... --mac=... --ip=... or inherited from existing system profile when we schedule the kickstart through WebUI), but this snippet is after calling rhnreg_ks so that hostname is not correctly set at time of rhnreg_ks execution and in conjunction with code logic in rhnreg_ks it leads to sending the unknown string as profilename and hostname to Satellite, because rhnreg_ks code 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 calling gethostname() 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.

Current Customers and Partners

Log in for full access

Log In