diff options
| author | 2026-05-13 13:43:16 +0100 | |
|---|---|---|
| committer | 2026-05-13 13:43:16 +0100 | |
| commit | e44fd262a68cbdeb992c6f36189c95bc3090c721 (patch) | |
| tree | 3be16e13807024a06f30ffff0d349277ba9fedd1 | |
| parent | 208877d1e682536aa737748fffe4560956d3908a (diff) | |
| download | dotfiles-e44fd262a68cbdeb992c6f36189c95bc3090c721.tar.gz dotfiles-e44fd262a68cbdeb992c6f36189c95bc3090c721.tar.bz2 dotfiles-e44fd262a68cbdeb992c6f36189c95bc3090c721.zip | |
fix(etc): restrict lsblk to the parent device only
lsblk without -d lists the partition AND its children, so on a LUKS
setup the second line (the mapper's UUID) was leaking into the
rendered cmdline and deploy script. Add -d so only the partition's
own UUID is emitted.
| -rw-r--r-- | etc/kernel/cmdline.tmpl | 2 | ||||
| -rwxr-xr-x | run_onchange_after_deploy-etc.sh.tmpl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/etc/kernel/cmdline.tmpl b/etc/kernel/cmdline.tmpl index dab0461..d7512dd 100644 --- a/etc/kernel/cmdline.tmpl +++ b/etc/kernel/cmdline.tmpl @@ -1 +1 @@ -rd.luks.name={{ output "lsblk" "-no" "UUID" (printf "/dev/%s" .luksRootPartition) | trim }}=root root=/dev/mapper/root rw quiet +rd.luks.name={{ output "lsblk" "-dno" "UUID" (printf "/dev/%s" .luksRootPartition) | trim }}=root root=/dev/mapper/root rw quiet diff --git a/run_onchange_after_deploy-etc.sh.tmpl b/run_onchange_after_deploy-etc.sh.tmpl index e72b374..d82a1d6 100755 --- a/run_onchange_after_deploy-etc.sh.tmpl +++ b/run_onchange_after_deploy-etc.sh.tmpl @@ -2,7 +2,7 @@ # Deploy system-level configs from etc/ to /etc/. # chezmoi re-runs this script whenever any file under etc/ changes. # etc/ content hash: {{ output "sh" "-c" (printf "cd %q && find etc -type f ! -name .ignore -exec sha256sum {} + | LC_ALL=C sort" .chezmoi.sourceDir) | sha256sum }} -# luks root uuid: {{ output "lsblk" "-no" "UUID" (printf "/dev/%s" .luksRootPartition) | trim }} +# luks root uuid: {{ output "lsblk" "-dno" "UUID" (printf "/dev/%s" .luksRootPartition) | trim }} set -eu cd "$CHEZMOI_SOURCE_DIR" |
