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
This commit is contained in:
parent
20e26fcd3b
commit
8ce4ab4927
|
@ -70,7 +70,8 @@ do_backup_files() {
|
||||||
tar -rf $BACKUP_FILE --transform='s,^,info/,' -C $NAME installed_packages mac_addr
|
tar -rf $BACKUP_FILE --transform='s,^,info/,' -C $NAME installed_packages mac_addr
|
||||||
|
|
||||||
# 6. Create stable link
|
# 6. Create stable link
|
||||||
ln -sf $BACKUP_FILE /data/sysmocom-backup.tar
|
cd /data/
|
||||||
|
ln -sf `basename $BACKUP_FILE` sysmocom-backup.tar
|
||||||
|
|
||||||
# 76
|
# 76
|
||||||
echo "The backup was stored to $BACKUP_FILE"
|
echo "The backup was stored to $BACKUP_FILE"
|
||||||
|
|
Loading…
Reference in New Issue