From 27fe5660a5165aec057e595450368f784dd13bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Fri, 9 Jan 2015 23:50:07 +0100 Subject: [PATCH] Fix multiple installations in NOOBS When installing two OpenELEC based distro with NOOBS, the labels of the SYSTEM partitions conflict. This fix address that problem by prefixing the names of these partitions by the DISTRONAME. --- config/noobs/partitions.json | 4 ++-- scripts/image | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/config/noobs/partitions.json b/config/noobs/partitions.json index 25aeaee454..01c1885d7a 100644 --- a/config/noobs/partitions.json +++ b/config/noobs/partitions.json @@ -1,7 +1,7 @@ { "partitions": [ { - "label": "System", + "label": "@DISTRONAME@System", "filesystem_type": "FAT", "partition_size_nominal": 160, "want_maximised": false, @@ -9,7 +9,7 @@ "mkfs_options": "" }, { - "label": "Storage", + "label": "@DISTRONAME@Storage", "filesystem_type": "ext4", "partition_size_nominal": 864, "want_maximised": true, diff --git a/scripts/image b/scripts/image index 3283d9e56e..9a794ac80f 100755 --- a/scripts/image +++ b/scripts/image @@ -333,6 +333,9 @@ IMAGE_NAME="$DISTRONAME-$TARGET_VERSION" -e "s%@DESCRIPTION@%$DESCRIPTION%g" \ -i $RELEASE_DIR/os.json + sed -e "s%@DISTRONAME@%$DISTRONAME%g" \ + -i $RELEASE_DIR/partitions.json + # create System dir mkdir -p $RELEASE_DIR/System @@ -366,12 +369,12 @@ IMAGE_NAME="$DISTRONAME-$TARGET_VERSION" mkdir -p $RELEASE_DIR/Storage # remove an previous created release tarball - rm -rf $RELEASE_DIR/System.tar.xz - rm -rf $RELEASE_DIR/Storage.tar.xz + rm -rf $RELEASE_DIR/${DISTRONAME}System.tar.xz + rm -rf $RELEASE_DIR/${DISTRONAME}Storage.tar.xz # create filesystem tarballs - tar cJf $RELEASE_DIR/System.tar.xz -C $RELEASE_DIR/System/ . - tar cJf $RELEASE_DIR/Storage.tar.xz -C $RELEASE_DIR/Storage/ . + tar cJf $RELEASE_DIR/${DISTRONAME}System.tar.xz -C $RELEASE_DIR/System/ . + tar cJf $RELEASE_DIR/${DISTRONAME}Storage.tar.xz -C $RELEASE_DIR/Storage/ . # remove an filesystem dirs rm -rf $RELEASE_DIR/System