Backup scripts read device/UUID/target from the host config

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-23 14:36:46 -04:00
co-authored by Claude Sonnet 5
parent 83974f731d
commit 3d117e714c
3 changed files with 34 additions and 7 deletions
+6 -1
View File
@@ -19,9 +19,14 @@
# The bootloader in the SD's first sectors (idbloader/u-boot) is not touched.
set -euo pipefail
# Backup settings come from the host config (see hosts/vanlink.conf.example).
# shellcheck disable=SC1090
. "${VANLINK_CONF:-/etc/vanlink.conf}"
: "${SD_BACKUP_UUID:?set SD_BACKUP_UUID in /etc/vanlink.conf}"
[ "$(id -u)" -eq 0 ] || { echo "Run as root (sudo)." >&2; exit 1; }
SD_UUID=39118305-4927-47a4-acc7-ba022f37af22
SD_UUID=$SD_BACKUP_UUID
SD_ROOT_PART=/dev/disk/by-uuid/$SD_UUID
MOUNT_POINT=/mnt/sd-backup-root
FAILSAFE='boot-failesafe-rename-to:boot.scr'