Remove HELPER_URL from defaults.in & common.sh.in
authorNikos Skalkotos <skalkoto@grnet.gr>
Fri, 20 Sep 2013 13:55:51 +0000 (16:55 +0300)
committerNikos Skalkotos <skalkoto@grnet.gr>
Fri, 20 Sep 2013 13:55:51 +0000 (16:55 +0300)
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
snf-image-host/defaults.in
snf-image-host/snf-image-update-helper.in

index ca036c0..1f72ad4 100644 (file)
@@ -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}
index 904f927..f99a435 100644 (file)
@@ -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@"
index fd40526..726f059 100644 (file)
@@ -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"