sysmocom-backup-data: Avoid an absolute symlink to fix restoring

When restoring the backup the rootfs is mounted in /rootfs/data
and the symlink to the real file would then not work. Attempt to
change the directory first to get a relative symlink.

Untested change and needed for rauc
jluebbe/sysmobts-dsp
Holger Hans Peter Freyther 7 years ago
parent 20e26fcd3b
commit 8ce4ab4927

@ -70,7 +70,8 @@ do_backup_files() {
tar -rf $BACKUP_FILE --transform='s,^,info/,' -C $NAME installed_packages mac_addr
# 6. Create stable link
ln -sf $BACKUP_FILE /data/sysmocom-backup.tar
cd /data/
ln -sf `basename $BACKUP_FILE` sysmocom-backup.tar
# 76
echo "The backup was stored to $BACKUP_FILE"

Loading…
Cancel
Save