From bc9404c4606d1d3e2283ab086b79e157c1b39ba3 Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Fri, 29 Jul 2016 12:15:43 +0300 Subject: [PATCH] Fix for customize_image --- common.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common.sh b/common.sh index a5edec966..0cf0c0c2c 100644 --- a/common.sh +++ b/common.sh @@ -386,9 +386,12 @@ customize_image() cp $SRC/userpatches/customize-image.sh $CACHEDIR/sdcard/tmp/customize-image.sh chmod +x $CACHEDIR/sdcard/tmp/customize-image.sh mkdir -p $CACHEDIR/sdcard/tmp/overlay - mount --bind $SRC/userpatches/overlay $CACHEDIR/sdcard/tmp/overlay - # separate remount command for compatibility with Trusty (util-linux < 2.27) - mount -o remount,ro $CACHEDIR/sdcard/tmp/overlay + if [[ $(lsb_release -sc) == xenial ]]; then + # util-linux >= 2.27 required + mount -o bind,ro $SRC/userpatches/overlay $CACHEDIR/sdcard/tmp/overlay + else + mount -o bind $SRC/userpatches/overlay $CACHEDIR/sdcard/tmp/overlay + fi display_alert "Calling image customization script" "customize-image.sh" "info" chroot $CACHEDIR/sdcard /bin/bash -c "/tmp/customize-image.sh $RELEASE $FAMILY $BOARD $BUILD_DESKTOP" umount $CACHEDIR/sdcard/tmp/overlay