From c8474f8dbe2df8fa9af11e4b3d0bde24bb8b54f9 Mon Sep 17 00:00:00 2001 From: nl6720 Date: Thu, 9 Feb 2023 11:16:52 +0200 Subject: Move the .uuid file to /boot/grub/YYYY-mm-dd-HH-MM-SS-00.uuid To prevent the file from being accidentally missed when someone copies the ISO's contents, let's not place it in a directory that starts with a dot. Since all GRUB related files are in /boot/grub/, put it there too. Instead of using a more unique UUID for the file name, use `YYYY-mm-dd-HH-MM-SS-00.uuid` which matches the ISO's modification date in UTC,i.e. its "UUID". If multiple ISOs would be generated in the exact same second, the ISO 9660 modification date (i.e. its "UUID") would be the same, so there would be not way to distinguish between the volumes anyway. This also makes the file look less suspicious to the casual glance. --- configs/baseline/grub/grub.cfg | 2 +- configs/releng/grub/grub.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'configs') diff --git a/configs/baseline/grub/grub.cfg b/configs/baseline/grub/grub.cfg index e855ea9..13043b3 100644 --- a/configs/baseline/grub/grub.cfg +++ b/configs/baseline/grub/grub.cfg @@ -29,7 +29,7 @@ if [ -z "${ARCHISO_UUID}" ]; then if [ -z "${ARCHISO_HINT}" ]; then regexp --set=1:ARCHISO_HINT '^\(([^)]+)\)' "${cmdpath}" fi - search --no-floppy --set=root --file '/.disk/%UUID_SEARCH_FILENAME%.uuid' --hint "${ARCHISO_HINT}" + search --no-floppy --set=root --file '%ARCHISO_SEARCH_FILENAME%' --hint "${ARCHISO_HINT}" probe --set ARCHISO_UUID --fs-uuid "${root}" fi diff --git a/configs/releng/grub/grub.cfg b/configs/releng/grub/grub.cfg index 88a5d60..c4478e8 100644 --- a/configs/releng/grub/grub.cfg +++ b/configs/releng/grub/grub.cfg @@ -29,7 +29,7 @@ if [ -z "${ARCHISO_UUID}" ]; then if [ -z "${ARCHISO_HINT}" ]; then regexp --set=1:ARCHISO_HINT '^\(([^)]+)\)' "${cmdpath}" fi - search --no-floppy --set=root --file '/.disk/%UUID_SEARCH_FILENAME%.uuid' --hint "${ARCHISO_HINT}" + search --no-floppy --set=root --file '%ARCHISO_SEARCH_FILENAME%' --hint "${ARCHISO_HINT}" probe --set ARCHISO_UUID --fs-uuid "${root}" fi -- cgit v1.2.3-54-g00ecf