rootfsinstall: don't overwrite /usr/libexec/init_resize if already present in rootfs

This commit is contained in:
Silvan Calarco 2021-02-02 13:37:37 +01:00
parent a6cd686894
commit e856dc7951
2 changed files with 2 additions and 2 deletions

View File

@ -114,7 +114,7 @@ main () {
if [ "$ROOT_PART_END" -eq "$TARGET_END" ]; then
# Issue a warning but continue trying to resize filesystem
echo "Warning: root partition already resized\n"
echo "Warning: root partition already resized"
else
if ! parted -m "$ROOT_DEV" u s resizepart "$ROOT_PART_NUM" "$TARGET_END"; then
FAIL_REASON="Root partition resize failed"

View File

@ -567,7 +567,7 @@ elif [ "$TARGETDEVICE" = "rpi" -o "$TARGETDEVICE" = "rpi64" ]; then
[ "$USEKERNEL2" ] && cp $ROOTMP/boot/$USEKERNEL2 $KERNELDEST2
[ "$USEKERNEL3" ] && cp $ROOTMP/boot/$USEKERNEL3 $KERNELDEST3
[ -e /usr/libexec/init_resize ] && cp /usr/libexec/init_resize ${ROOTMP}/usr/libexec/
[ -e /usr/libexec/init_resize -a ! -e ${ROOTMP}/usr/libexec/init_resize ] && cp /usr/libexec/init_resize ${ROOTMP}/usr/libexec/
[ -e ${ROOTMP}/usr/libexec/init_resize ] && CMDLINE_ADD=" init=/usr/libexec/init_resize"
#chroot $ROOTMP depmod -ae