From a012bc8477df358528b92b0e624dc7cdff1ea044 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 8 Mar 2018 11:50:07 +0000 Subject: [PATCH] Replacements in custom build script --- src/freedombone-image-make | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freedombone-image-make b/src/freedombone-image-make index fcf99df9..db45e646 100755 --- a/src/freedombone-image-make +++ b/src/freedombone-image-make @@ -193,7 +193,7 @@ fi echo $'Changing values within customised customisation script' cp "$PROJECT_INSTALL_DIR/${PROJECT_NAME}-image-customise" "$TEMP_CUSTOMISE3" if [ "$MYUSERNAME" ]; then - sed -i "s|MY_USERNAME=.*|MY_USERNAME=${MYUSERNAME}|g" "$TEMP_CUSTOMISE3" + sed -i "0,/MY_USERNAME=.*/s//MY_USERNAME=${MYUSERNAME}/" "$TEMP_CUSTOMISE3" fi if [ "$MYPASSWORD" ]; then sed -i "s|MY_PASSWORD=.*|MY_PASSWORD=${MYPASSWORD}|g" "$TEMP_CUSTOMISE3" @@ -211,7 +211,7 @@ sed -i "s|CONFIG_FILENAME=.*|CONFIG_FILENAME=${CONFIG_FILENAME}|g" "$TEMP_CUSTOM sed -i "s|SSH_PUBKEY=.*|SSH_PUBKEY=${SSH_PUBKEY}|g" "$TEMP_CUSTOMISE3" sed -i "s|GENERIC_IMAGE=.*|GENERIC_IMAGE=${GENERIC_IMAGE}|g" "$TEMP_CUSTOMISE3" sed -i "s|MINIMAL_INSTALL=.*|MINIMAL_INSTALL=\"${MINIMAL_INSTALL}\"|g" "$TEMP_CUSTOMISE3" -sed -i "s|SSH_PORT=.*|SSH_PORT=\"${SSH_PORT}\"|g" "$TEMP_CUSTOMISE3" +sed -i "0,/SSH_PORT=.*/s//SSH_PORT=\"${SSH_PORT}\"/" "$TEMP_CUSTOMISE3" sed -i "s|ONION_ONLY=.*|ONION_ONLY=\"${ONION_ONLY}\"|g" "$TEMP_CUSTOMISE3" sed -i "s|PROJECT_REPO=.*|PROJECT_REPO=\"${PROJECT_REPO}\"|g" "$TEMP_CUSTOMISE3" sed -i "s|DEBIAN_INSTALL_ONLY=.*|DEBIAN_INSTALL_ONLY=\"${DEBIAN_INSTALL_ONLY}\"|g" "$TEMP_CUSTOMISE3"