summaryrefslogtreecommitdiffstats
path: root/builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh
diff options
context:
space:
mode:
authorJonathan Bauer2020-01-28 11:35:32 +0100
committerJonathan Bauer2020-01-28 11:35:32 +0100
commitd43073572917304cda121199330cbcdb19524840 (patch)
tree73ea5cdb3733f4a186621471d41ed2eeb0cfe682 /builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh
parentMerge branch 'nobash' of git.openslx.org:openslx-ng/systemd-init into nobash (diff)
parentbuild-initramfs.sh: remove '--no-tags' from git clone routine since it does n... (diff)
downloadsystemd-init-d43073572917304cda121199330cbcdb19524840.tar.gz
systemd-init-d43073572917304cda121199330cbcdb19524840.tar.xz
systemd-init-d43073572917304cda121199330cbcdb19524840.zip
Merge branch 'master' into nobash
Diffstat (limited to 'builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh')
-rwxr-xr-xbuilder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh14
1 files changed, 6 insertions, 8 deletions
diff --git a/builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh b/builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh
index 89852974..26e705b2 100755
--- a/builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh
+++ b/builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh
@@ -3,13 +3,12 @@
type emergency_shell >/dev/null 2>&1 || source /lib/dracut-lib.sh
-
-slx_server="$(getarg slxsrv=)"
-slx_server_base="$(getarg slxbase=)"
+. /etc/openslx
if [ -z "$SLX_NO_CONFIG_TGZ" ]; then
- # build config.tgz url
- conftgz_url="http://${slx_server#@}/${slx_server_base}/config.tgz"
+ # build config.tgz url from SLX_KCL_SERVERS and SLX_BASE_PATH
+ # both are written to /etc/openslx by dnbd3-rootfs's fetch-config.sh script
+ conftgz_url="http://${SLX_KCL_SERVERS}/${SLX_BASE_PATH}/config.tgz"
# check if system's uuid was set
if [ -s "/run/system-uuid" ]; then
@@ -22,8 +21,7 @@ if [ -z "$SLX_NO_CONFIG_TGZ" ]; then
slx-tools download_retry -s "${conftgz_url}" > "/etc/config.tgz"
if [[ ! -s "/etc/config.tgz" ]]; then
- warn \
- "Downloading 'config.tgz' from '${slx_server}' failed with: $return_code"
- # TODO handle error
+ warn "Failed to download '${conftgz_url}'!"
fi
fi
+: