From 9728e78981bb03dfae7a05ca4db826d7bd4fc761 Mon Sep 17 00:00:00 2001 From: Nikos Skalkotos Date: Fri, 20 Sep 2013 16:55:51 +0300 Subject: [PATCH] Remove HELPER_URL from defaults.in & common.sh.in The variable should only exist in snf-image-update-helper. If the user wants to overwrite the value, he should create it in /etc/default/snf-image-update-helper --- snf-image-host/common.sh.in | 1 - snf-image-host/defaults.in | 3 --- snf-image-host/snf-image-update-helper.in | 8 ++++++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/snf-image-host/common.sh.in b/snf-image-host/common.sh.in index ca036c0..1f72ad4 100644 --- a/snf-image-host/common.sh.in +++ b/snf-image-host/common.sh.in @@ -418,7 +418,6 @@ fi : ${IMAGE_DEBUG:="no"} : ${VERSION_CHECK:="@VERSION_CHECK@"} : ${HELPER_DIR:="@HELPER_DIR@"} -: ${HELPER_URL:="@HELPER_URL@"} : ${HELPER_SIZE:="600"} : ${HELPER_SOFT_TIMEOUT:=120} : ${HELPER_HARD_TIMEOUT:=5} diff --git a/snf-image-host/defaults.in b/snf-image-host/defaults.in index 904f927..f99a435 100644 --- a/snf-image-host/defaults.in +++ b/snf-image-host/defaults.in @@ -38,9 +38,6 @@ # HELPER_USER imeddiately before starting execution of the helper VM. # HELPER_USER="nobody" -# HELPER_URL: URL to use to download the snf-image-helper image -# HELPER_URL="@HELPER_URL@" - # MULTISTRAP_CONFIG: Configuration file to be used with multistrap to create # the rootfs of the helper image. # MULTISTRAP_CONFIG="@MULTISTRAP_CONFIG@" diff --git a/snf-image-host/snf-image-update-helper.in b/snf-image-host/snf-image-update-helper.in index fd40526..726f059 100644 --- a/snf-image-host/snf-image-update-helper.in +++ b/snf-image-host/snf-image-update-helper.in @@ -22,6 +22,14 @@ set -o errtrace . @osdir@/common.sh +DEFAULT_FILE="@sysconfdir@/default/snf-image-update-helper" + +if [ -f "$DEFAULT_FILE" ]; then + . "$DEFAULT_FILE" +fi + +: ${HELPER_URL:="@HELPER_URL@"} + usage() { local rc="$1" -- 1.7.10.4