diff --git a/export-image/00-allow-rerun/00-run.sh b/export-image/00-allow-rerun/00-run.sh index 1355b2ef7f..b77c30e958 100755 --- a/export-image/00-allow-rerun/00-run.sh +++ b/export-image/00-allow-rerun/00-run.sh @@ -1,13 +1,5 @@ #!/bin/bash -e -if [ -e ${ROOTFS_DIR}/etc/ld.so.preload ]; then - mv ${ROOTFS_DIR}/etc/ld.so.preload ${ROOTFS_DIR}/etc/ld.so.preload.disabled -fi - -if [ ! -e ${ROOTFS_DIR}/usr/sbin/policy-rc.d ]; then - install -m 744 files/policy-rc.d ${ROOTFS_DIR}/usr/sbin/ -fi - if [ ! -x ${ROOTFS_DIR}/usr/bin/qemu-arm-static ]; then cp /usr/bin/qemu-arm-static ${ROOTFS_DIR}/usr/bin/ fi diff --git a/export-image/00-allow-rerun/files/policy-rc.d b/export-image/00-allow-rerun/files/policy-rc.d deleted file mode 100644 index 1924710fd0..0000000000 --- a/export-image/00-allow-rerun/files/policy-rc.d +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exit 101 diff --git a/export-image/04-finalise/01-run.sh b/export-image/04-finalise/01-run.sh index f04c7eec8a..b093f014b8 100755 --- a/export-image/04-finalise/01-run.sh +++ b/export-image/04-finalise/01-run.sh @@ -13,13 +13,7 @@ if [ -d ${ROOTFS_DIR}/home/pi/.config ]; then fi rm -f ${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache -rm -f ${ROOTFS_DIR}/usr/sbin/policy-rc.d rm -f ${ROOTFS_DIR}/usr/bin/qemu-arm-static -if [ "${USE_QEMU}" != "1" ]; then - if [ -e ${ROOTFS_DIR}/etc/ld.so.preload.disabled ]; then - mv ${ROOTFS_DIR}/etc/ld.so.preload.disabled ${ROOTFS_DIR}/etc/ld.so.preload - fi -fi rm -f ${ROOTFS_DIR}/etc/apt/sources.list~ rm -f ${ROOTFS_DIR}/etc/apt/trusted.gpg~ diff --git a/export-image/prerun.sh b/export-image/prerun.sh index cec133c263..72cb299016 100755 --- a/export-image/prerun.sh +++ b/export-image/prerun.sh @@ -13,7 +13,8 @@ BOOT_SIZE=$(du --apparent-size -s ${EXPORT_ROOTFS_DIR}/boot --block-size=1 | cut TOTAL_SIZE=$(du --apparent-size -s ${EXPORT_ROOTFS_DIR} --exclude var/cache/apt/archives --block-size=1 | cut -f 1) ROUND_SIZE="$((4 * 1024 * 1024))" -IMG_SIZE=$(((BOOT_SIZE + TOTAL_SIZE + (800 * 1024 * 1024) + ROUND_SIZE) / ROUND_SIZE * ROUND_SIZE)) +ROUNDED_ROOT_SECTOR=$(((2 * BOOT_SIZE + ROUND_SIZE) / ROUND_SIZE * ROUND_SIZE / 512 + 8192)) +IMG_SIZE=$(((BOOT_SIZE + TOTAL_SIZE + (800 * 1024 * 1024) + ROUND_SIZE - 1) / ROUND_SIZE * ROUND_SIZE)) truncate -s ${IMG_SIZE} ${IMG_FILE} fdisk -H 255 -S 63 ${IMG_FILE} <