From cd57adc856daf87e2fcfc0a73493e54d0617f564 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Mon, 12 Jun 2023 02:00:05 +0300 Subject: [PATCH] BuildSystem: every file except /home/* is now owned by root --- image-full.sh | 3 ++- image.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/image-full.sh b/image-full.sh index 414a90beed..3f211e92b3 100755 --- a/image-full.sh +++ b/image-full.sh @@ -48,7 +48,8 @@ sudo mkfs.ext2 $PARTITION2 > /dev/null sudo mount $PARTITION2 $MOUNT_DIR -sudo cp -r ${SYSROOT}/* ${MOUNT_DIR}/ +sudo cp -rp ${SYSROOT}/* ${MOUNT_DIR}/ +sudo find $MOUNT_DIR | grep -v "^${MOUNT_DIR}/home/" | sudo xargs chown 0:0 sudo grub-install --no-floppy --target=i386-pc --modules="normal ext2 multiboot" --boot-directory=${MOUNT_DIR}/boot $LOOP_DEV > /dev/null diff --git a/image.sh b/image.sh index ab03fa6639..fa64cce6a1 100755 --- a/image.sh +++ b/image.sh @@ -15,7 +15,8 @@ ROOT_PARTITON=${LOOP_DEV}p2 sudo mount $ROOT_PARTITON $MOUNT_DIR -sudo cp -r ${SYSROOT}/* ${MOUNT_DIR}/ +sudo cp -rp ${SYSROOT}/* ${MOUNT_DIR}/ +sudo find $MOUNT_DIR | grep -v "^${MOUNT_DIR}/home/" | sudo xargs chown 0:0 sudo umount $MOUNT_DIR