From 79043cb4e5ed91542e4f57def6f527c1cfd688fd Mon Sep 17 00:00:00 2001 From: Tin Lai Date: Mon, 29 May 2023 14:32:37 +1000 Subject: [PATCH 1/2] add config for yadm to create read-only template output Signed-off-by: Tin Lai --- yadm | 1 + 1 file changed, 1 insertion(+) diff --git a/yadm b/yadm index 003d954..0047ec3 100755 --- a/yadm +++ b/yadm @@ -540,6 +540,7 @@ function move_file() { mv -f "$temp_file" "$output" copy_perms "$input" "$output" + [ "$(config --bool yadm.template-read-only)" == "true" ] && chmod -w "$output" } # ****** yadm Commands ****** From b4e76f2ad3e3dc374427b9936ee4b14179a6d207 Mon Sep 17 00:00:00 2001 From: Tin Lai Date: Tue, 6 Jun 2023 09:23:20 +1000 Subject: [PATCH 2/2] template ro removes write permission for all Signed-off-by: Tin Lai --- yadm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yadm b/yadm index 0047ec3..8ac9263 100755 --- a/yadm +++ b/yadm @@ -540,7 +540,7 @@ function move_file() { mv -f "$temp_file" "$output" copy_perms "$input" "$output" - [ "$(config --bool yadm.template-read-only)" == "true" ] && chmod -w "$output" + [ "$(config --bool yadm.template-read-only)" == "true" ] && chmod a-w "$output" } # ****** yadm Commands ******