diff options
author | Marcel Partap <mpartap@gmx.net> | 2021-01-14 12:29:51 +0100 |
---|---|---|
committer | Marcel Partap <mpartap@gmx.net> | 2021-01-15 22:32:14 +0100 |
commit | 63c1a5997de819dc89c38834535ab9f7c0a70c73 (patch) | |
tree | efb665118dec37944f85c9bfc86d6576633cf155 | |
parent | 91e1e65c873291d11495730d8ce6df5940706c2b (diff) | |
download | vyos-live-build-63c1a5997de819dc89c38834535ab9f7c0a70c73.tar.gz vyos-live-build-63c1a5997de819dc89c38834535ab9f7c0a70c73.zip |
binary_rootfs stage: give custom MKSQUASHFS_OPTIONS precedence
courtesy of
sed -i -r '/MKSQUASHFS_OPTIONS/ s/"(\$\{.*\}) ([^"]+)"/"\2 \1"/' scripts/build/binary_rootfs
-rwxr-xr-x | scripts/build/binary_rootfs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/build/binary_rootfs b/scripts/build/binary_rootfs index 0f72620f5..11aa37911 100755 --- a/scripts/build/binary_rootfs +++ b/scripts/build/binary_rootfs @@ -265,16 +265,16 @@ case "${LB_CHROOT_FILESYSTEM}" in # Remove stale squashfs image rm -f chroot/filesystem.squashfs - MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -no-progress" + MKSQUASHFS_OPTIONS="-no-progress ${MKSQUASHFS_OPTIONS}" if [ "${_VERBOSE}" = "true" ] then - MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -info" + MKSQUASHFS_OPTIONS="-info ${MKSQUASHFS_OPTIONS}" fi if [ -f config/rootfs/squashfs.sort ] then - MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -sort squashfs.sort" + MKSQUASHFS_OPTIONS="-sort squashfs.sort ${MKSQUASHFS_OPTIONS}" case "${LB_BUILD_WITH_CHROOT}" in true) @@ -290,14 +290,14 @@ case "${LB_CHROOT_FILESYSTEM}" in # Set squashfs compression type or default to xz if [ -n "${LB_CHROOT_SQUASHFS_COMPRESSION_TYPE}" ] then - MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -comp ${LB_CHROOT_SQUASHFS_COMPRESSION_TYPE}" + MKSQUASHFS_OPTIONS="-comp ${LB_CHROOT_SQUASHFS_COMPRESSION_TYPE} ${MKSQUASHFS_OPTIONS}" else - MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -comp xz" + MKSQUASHFS_OPTIONS="-comp xz ${MKSQUASHFS_OPTIONS}" fi if [ -n "${LB_CHROOT_SQUASHFS_COMPRESSION_LEVEL}" ] then - MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -Xcompression-level ${LB_CHROOT_SQUASHFS_COMPRESSION_LEVEL}" + MKSQUASHFS_OPTIONS="-Xcompression-level ${LB_CHROOT_SQUASHFS_COMPRESSION_LEVEL} ${MKSQUASHFS_OPTIONS}" fi case "${LB_BUILD_WITH_CHROOT}" in @@ -306,7 +306,7 @@ case "${LB_CHROOT_FILESYSTEM}" in then cp -a config/rootfs/excludes chroot/excludes - MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -wildcards -ef /excludes" + MKSQUASHFS_OPTIONS="-wildcards -ef /excludes ${MKSQUASHFS_OPTIONS}" fi # Create image @@ -344,7 +344,7 @@ case "${LB_CHROOT_FILESYSTEM}" in false) if [ -e config/rootfs/excludes ] then - MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -wildcards -ef config/rootfs/excludes" + MKSQUASHFS_OPTIONS="-wildcards -ef config/rootfs/excludes ${MKSQUASHFS_OPTIONS}" fi nice -n 19 mksquashfs chroot binary/${INITFS}/filesystem.squashfs ${MKSQUASHFS_OPTIONS} |