mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
nixos/ec2-data: use hostname-debian to set hostname from metadata
This is the simpler, more lightweight and better maintained version of the hostname utility.
This commit is contained in:
parent
387e804c99
commit
c21be3563e
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@ with lib;
|
||||||
${optionalString (config.networking.hostName == "") ''
|
${optionalString (config.networking.hostName == "") ''
|
||||||
echo "setting host name..."
|
echo "setting host name..."
|
||||||
if [ -s /etc/ec2-metadata/hostname ]; then
|
if [ -s /etc/ec2-metadata/hostname ]; then
|
||||||
${pkgs.nettools}/bin/hostname $(cat /etc/ec2-metadata/hostname)
|
${lib.getExe hostname-debian} -F /etc/ec2-metadata/hostname
|
||||||
fi
|
fi
|
||||||
''}
|
''}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue