Get the deb/ubuntu change host name correct
This commit is contained in:
parent
203594e41a
commit
bc7b481dbe
|
@ -9,7 +9,7 @@ module VagrantPlugins
|
||||||
comm.sudo("sed -i 's/.*$/#{name.split('.')[0]}/' /etc/hostname")
|
comm.sudo("sed -i 's/.*$/#{name.split('.')[0]}/' /etc/hostname")
|
||||||
comm.sudo("hostname -F /etc/hostname")
|
comm.sudo("hostname -F /etc/hostname")
|
||||||
comm.sudo("hostname --fqdn > /etc/mailname")
|
comm.sudo("hostname --fqdn > /etc/mailname")
|
||||||
comm.sudo("ifdown -a; ifup -a --allow=hotplug")
|
comm.sudo("ifdown -a; ifup -a; ifup -a --allow=hotplug")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,7 +14,7 @@ module VagrantPlugins
|
||||||
comm.sudo("service hostname start")
|
comm.sudo("service hostname start")
|
||||||
end
|
end
|
||||||
comm.sudo("hostname --fqdn > /etc/mailname")
|
comm.sudo("hostname --fqdn > /etc/mailname")
|
||||||
comm.sudo("ifdown -a; ifup -a --allow=hotplug")
|
comm.sudo("ifdown -a; ifup -a; ifup -a --allow=hotplug")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue