Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send the client hostname to be used if unset #9

Merged

Conversation

jeffmccune
Copy link
Contributor

Without this patch the hostname is not being set based on the DHCP
offer. This is using a relatively stock Debian Squeeze installation.
The hostname has been cleared from /etc/hostname

This patch requires an accompanying change to dhclient on the agent.
The following exit hook will properly set the hostname on Squeeze.

# /etc/dhcp/dhclient-exit-hooks.d/hostname
export PATH=/opt/puppet/bin:/usr/bin:/bin:/sbin:/usr/sbin:$PATH
hostname $new_host_name
puppet resource host $(facter fqdn) \
  ensure=present \
  ip=$(facter ipaddress) \
  host_aliases=$(facter hostname)

Without this patch the hostname is not being set based on the DHCP
offer.  This is using a relatively stock Debian Squeeze installation.
The hostname has been cleared from /etc/hostname

This patch requires an accompanying change to dhclient on the agent.
The following exit hook will properly set the hostname on Squeeze.

    # /etc/dhcp/dhclient-exit-hooks.d/hostname
    export PATH=/opt/puppet/bin:/usr/bin:/bin:/sbin:/usr/sbin:$PATH
    hostname $new_host_name
    puppet resource host $(facter fqdn) \
      ensure=present \
      ip=$(facter ipaddress) \
      host_aliases=$(facter hostname)
jeffmccune pushed a commit that referenced this pull request Jun 11, 2012
Send the client hostname to be used if unset
@jeffmccune jeffmccune merged commit ca6f50c into voxpupuli:master Jun 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant