From 7338f5ff4651eaa22ea56eff8b6e9a22066b65ae Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 28 Sep 2015 13:31:28 +0200 Subject: [PATCH] ec2-data.nix: Remove superfluous check --- nixos/modules/virtualisation/ec2-data.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nixos/modules/virtualisation/ec2-data.nix b/nixos/modules/virtualisation/ec2-data.nix index 91f4774cdc26..383750520ab7 100644 --- a/nixos/modules/virtualisation/ec2-data.nix +++ b/nixos/modules/virtualisation/ec2-data.nix @@ -35,10 +35,8 @@ with lib; mkdir -m 0700 -p /root/.ssh $wget http://169.254.169.254/1.0/meta-data/public-keys/0/openssh-key > /root/key.pub if [ $? -eq 0 -a -e /root/key.pub ]; then - if ! grep -q -f /root/key.pub /root/.ssh/authorized_keys; then - cat /root/key.pub >> /root/.ssh/authorized_keys - echo "new key added to authorized_keys" - fi + cat /root/key.pub >> /root/.ssh/authorized_keys + echo "new key added to authorized_keys" chmod 600 /root/.ssh/authorized_keys rm -f /root/key.pub fi