* Don't get the hostname from EC2 if one has been set explicitly.
svn path=/nixos/trunk/; revision=30200
This commit is contained in:
parent
fe566d84ae
commit
ba1a7188c1
1 changed files with 5 additions and 1 deletions
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
with pkgs.lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
jobs.fetchEC2Data =
|
jobs.fetchEC2Data =
|
||||||
|
@ -16,7 +18,9 @@
|
||||||
script =
|
script =
|
||||||
''
|
''
|
||||||
echo "setting host name..."
|
echo "setting host name..."
|
||||||
${pkgs.nettools}/bin/hostname $(${pkgs.curl}/bin/curl http://169.254.169.254/1.0/meta-data/hostname)
|
${optionalString (config.networking.hostName == "") ''
|
||||||
|
${pkgs.nettools}/bin/hostname $(${pkgs.curl}/bin/curl http://169.254.169.254/1.0/meta-data/hostname)
|
||||||
|
''}
|
||||||
|
|
||||||
# Don't download the SSH key if it has already been injected
|
# Don't download the SSH key if it has already been injected
|
||||||
# into the image (a Nova feature).
|
# into the image (a Nova feature).
|
||||||
|
|
Loading…
Reference in a new issue