From 38a292227d91ef03e1ba91c43786b030aaf9d5a5 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 1 May 2023 20:29:49 -0400 Subject: [PATCH] Clarify PR #3564 (pre-download WiFi firmware backups) --- roles/firmware/tasks/download.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/firmware/tasks/download.yml b/roles/firmware/tasks/download.yml index c2927c0f9..abda2e6b4 100644 --- a/roles/firmware/tasks/download.yml +++ b/roles/firmware/tasks/download.yml @@ -17,7 +17,12 @@ # src: /lib/firmware/cypress/{{ item }} # dest: /lib/firmware/cypress/{{ item }}.orig # #local_follow: False # FAILS TO PRESERVE LINKS (ansible/ansible#74777) e.g. /lib/firmware/cypress/cyfmac43455-sdio.bin -> /etc/alternatives/cyfmac43455-sdio.bin -> ... - shell: mv /lib/firmware/cypress/{{ item }}.orig /lib/firmware/cypress/{{ item }}.orig.$(date +%F-%T) || true && cp -a /lib/firmware/cypress/{{ item }} /lib/firmware/cypress/{{ item }}.orig # "cp -P" == "cp --no-dereference" sufficient to replicate these symlinks and files ("cp -d" & "cp -a" are incrementally stronger, and so probably can't hurt) + # 2023-05-01 CLARIF OF BELOW: + # 1) Even if 'mv' fails, no matter it'll continue to 'cp' below + # 2) 'cp -P' == 'cp --no-dereference' sufficient to replicate these symlinks and files ('cp -d' & 'cp -a' are incrementally stronger, and so probably can't hurt) + shell: | + mv /lib/firmware/cypress/{{ item }}.orig /lib/firmware/cypress/{{ item }}.orig.$(date +%F-%T) + cp -a /lib/firmware/cypress/{{ item }} /lib/firmware/cypress/{{ item }}.orig with_items: - cyfmac43430-sdio.bin - cyfmac43430-sdio.clm_blob