Backup scripts read device/UUID/target from the host config
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user