#!/usr/bin/env bash # -*- coding: utf-8 -*- type emergency_shell >/dev/null 2>&1 || source /lib/dracut-lib.sh . /etc/openslx if [ -z "$SLX_NO_CONFIG_TGZ" ]; then # 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 uuid="$(cat /run/system-uuid)" if [ -n "$uuid" ]; then conftgz_url="${conftgz_url}?uuid=${uuid}" fi fi info "Download config.tgz from '$conftgz_url'..." slx-tools download_retry --slx-time 20 -sS "${conftgz_url}" > "/etc/config.tgz" if [[ ! -s "/etc/config.tgz" ]]; then warn "Failed to download '${conftgz_url}'!" fi fi :