fix: QNAP permission errors

This commit is contained in:
Kroese 2025-04-07 17:10:34 +02:00 committed by GitHub
parent ba8f0e4029
commit 30a754f29b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -272,10 +272,10 @@ rm -f "$MOUNT/.SynoUpgradePackages/ActiveInsight-"*
[ -s "$HDP.txz" ] && tar xpfJ "$HDP.txz" --absolute-names -C "$MOUNT/"
INDEX_DB=""
if [ -s "$IDB.txz" ]; then
INDEX_DB="$MOUNT/usr/syno/synoman/indexdb/"
mkdir -p "$INDEX_DB"
tar xpfJ "$IDB.txz" --absolute-names -C "$INDEX_DB"
fi
LABEL="1.44.1-42218"
@ -284,6 +284,7 @@ NUMBLOCKS="2097152" # (16777216 * 512) / 4096
MSG="Installing system partition..."
fakeroot -- bash -c "set -Eeu;\
[ -d "$INDEX_DB" ] && tar xpfJ "$IDB.txz" --absolute-names -C "$INDEX_DB";\
tar xpfJ $HDA.txz --absolute-names --skip-old-files -C $MOUNT/;\
printf '%b%s%b' '\E[1;34m \E[1;36m' 'Install: $MSG' '\E[0m\n';\
mke2fs -q -t ext4 -b 4096 -d $MOUNT/ -L $LABEL -F -E offset=$OFFSET $SYSTEM $NUMBLOCKS"