From c7b653aec03cfbe940ad733bdc2d5a2060dc36ce Mon Sep 17 00:00:00 2001 From: DanyLE Date: Wed, 2 Aug 2023 18:19:25 +0200 Subject: [PATCH] add system update tools --- recipes-diya/initramfs/files/diya-update | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/recipes-diya/initramfs/files/diya-update b/recipes-diya/initramfs/files/diya-update index 0552254..fbee921 100755 --- a/recipes-diya/initramfs/files/diya-update +++ b/recipes-diya/initramfs/files/diya-update @@ -45,16 +45,13 @@ rootfs() return 1 fi echo "Installing new rootfs" - cd $TMP_MOUNT - if ! tar --same-owner -xpvf "$path" .; then + if ! tar --same-owner -xpvf "$path" -C $TMP_MOUNT; then echo "Error: unable to install new rootfs. Restore and quit" - cd umount $TMP_MOUNT dd if=$backup_file of=$ROOTFS_DEV return 1 fi sync - cd echo "Unmount the rootfs partition" umount $TMP_MOUNT echo "Done"