Skip to content

Commit

Permalink
Set the hostname before starting DHCP.
Browse files Browse the repository at this point in the history
This allows the DHCP client to correctly report the hostname of the
system the the DHCP server. Previously all boot2docker instances would
report a static value of 'box'.

Fixes docker#1096
  • Loading branch information
metcalfc committed Nov 26, 2015
1 parent cef800b commit d893bae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rootfs/rootfs/bootscript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
# Automount a hard drive
/etc/rc.d/automount

# set the hostname
/etc/rc.d/hostname

# Trigger the DHCP request sooner (the x64 bit userspace appears to be a second slower)
echo "$(date) dhcp -------------------------------"
/etc/rc.d/dhcp.sh
Expand All @@ -26,9 +29,6 @@ mkdir -p /var/lib/boot2docker/log
# import settings from profile (or unset them)
test -f "/var/lib/boot2docker/profile" && . "/var/lib/boot2docker/profile"

# set the hostname
/etc/rc.d/hostname

# sync the clock
/etc/rc.d/ntpd &

Expand Down

0 comments on commit d893bae

Please sign in to comment.