feat: Store config in RAM (#559)

This commit is contained in:
Kroese
2024-01-13 20:25:57 +01:00
committed by GitHub
parent 3a507f5bf6
commit 575da1f574
7 changed files with 31 additions and 28 deletions

View File

@@ -139,7 +139,7 @@ if [ -f "$RDC" ]; then
(( rc != 0 )) && error "Failed to extract $RDC, reason $rc" && exit 92
fi
mkdir -p /run/extract
rm -rf /run/extract && mkdir -p /run/extract
for file in $TMP/usr/lib/libcurl.so.4 \
$TMP/usr/lib/libmbedcrypto.so.5 \
$TMP/usr/lib/libmbedtls.so.13 \
@@ -211,6 +211,7 @@ else
fi
rm -rf /run/extract
info "Install: Preparing system partition..."
BOOT=$(find "$TMP" -name "*.bin.zip")
@@ -275,15 +276,8 @@ PKG="$TMP/packages"
HDP="$TMP/synohdpack_img"
[ ! -f "$HDA.tgz" ] && error "The PAT file contains no OS image." && exit 64
mv "$HDA.tgz" "$HDA.txz"
if [[ "$ROOT" != [Nn]* ]]; then
tar xpfJ "$HDA.txz" --absolute-names -C "$MOUNT/"
fi
[ -d "$PKG" ] && mv "$PKG/" "$MOUNT/.SynoUpgradePackages/"
rm -f "$MOUNT/.SynoUpgradePackages/ActiveInsight-"*
@@ -301,6 +295,8 @@ NUMBLOCKS="622560" # (4980480 * 512) / 4096
if [[ "$ROOT" != [Nn]* ]]; then
tar xpfJ "$HDA.txz" --absolute-names --skip-old-files -C "$MOUNT/"
info "Install: Installing system partition..."
mke2fs -q -t ext4 -b 4096 -d "$MOUNT/" -L "$LABEL" -F -E "offset=$OFFSET" "$SYSTEM" "$NUMBLOCKS"