Run mksquashfs with nice -n 19 to not overload the system

Machines tend to become unresponsive during the mksquashfs step.
Avoid this by lowering the priority of the process.

Thanks: Ronny Standtke for the patch.
Closes: #867539
This commit is contained in:
Raphaël Hertzog 2018-02-24 17:04:04 +01:00
parent ee8d06c46c
commit 842e971a65
1 changed files with 2 additions and 2 deletions

View File

@ -352,7 +352,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
fi
# Create image
Chroot chroot "mksquashfs chroot filesystem.squashfs ${MKSQUASHFS_OPTIONS}"
Chroot chroot "nice -n 19 mksquashfs chroot filesystem.squashfs ${MKSQUASHFS_OPTIONS}"
rm -f chroot/chroot/excludes
@ -413,7 +413,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -wildcards -ef config/rootfs/excludes"
fi
mksquashfs chroot binary/${INITFS}/filesystem.squashfs ${MKSQUASHFS_OPTIONS}
nice -n 19 mksquashfs chroot binary/${INITFS}/filesystem.squashfs ${MKSQUASHFS_OPTIONS}
du -B 1 -s chroot | cut -f1 > binary/${INITFS}/filesystem.size
;;