mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-16 13:22:47 +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
|
||||
rm -f /dhclient.conf
|
||||
cat > /dhclient.conf << EOF
|
||||
send host-name "<hostname>";
|
||||
send host-name = gethostname();
|
||||
EOF
|
||||
ifconfig eth0 up
|
||||
dhclient eth0 -cf /dhclient.conf
|
||||
|
Loading…
Reference in New Issue
Block a user