mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-17 16:27:11 +00:00
ssh: send hostname to dhcp server
Send container's hostname to dhcp server when getting ip address. Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
4849ab991b
commit
b78b2e23a1
@ -229,7 +229,7 @@ if [ $0 = "/sbin/init" ]; then
|
|||||||
touch /etc/fstab
|
touch /etc/fstab
|
||||||
rm -f /dhclient.conf
|
rm -f /dhclient.conf
|
||||||
cat > /dhclient.conf << EOF
|
cat > /dhclient.conf << EOF
|
||||||
send host-name "<hostname>";
|
send host-name = gethostname();
|
||||||
EOF
|
EOF
|
||||||
ifconfig eth0 up
|
ifconfig eth0 up
|
||||||
dhclient eth0 -cf /dhclient.conf
|
dhclient eth0 -cf /dhclient.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user