From ccaa942888f53404b56d979cb3a0a5c9f18a1faa Mon Sep 17 00:00:00 2001 From: sbh69840 Date: Wed, 10 May 2023 20:03:21 +0530 Subject: don't check knownSha256 for authorized_keys files --- modules/system/etc.nix | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'modules/system') diff --git a/modules/system/etc.nix b/modules/system/etc.nix index a27e49e..4b45e3a 100644 --- a/modules/system/etc.nix +++ b/modules/system/etc.nix @@ -57,6 +57,10 @@ in if [ ! -e "$d" ]; then mkdir -p "$d" fi + if [ -e "$f".copy ]; then + cp "$f" "$l" + continue + fi if [ -e "$l" ]; then if [ "$(readlink "$l")" != "$f" ]; then if ! grep -q /etc/static "$l"; then @@ -65,11 +69,7 @@ in for h in ''${etcSha256Hashes["$l"]}; do if [ "$o" = "$h" ]; then mv "$l" "$l.orig" - if [ -e "$f".copy ]; then - cp "$f" "$l" - else - ln -s "$f" "$l" - fi + ln -s "$f" "$l" break else h= @@ -83,11 +83,7 @@ in fi fi else - if [ -e "$f".copy ]; then - cp "$f" "$l" - else - ln -s "$f" "$l" - fi + ln -s "$f" "$l" fi done -- cgit v1.2.3