diff options
Diffstat (limited to 'remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig')
-rw-r--r-- | remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig b/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig index 39680afc..ec98ff70 100644 --- a/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig +++ b/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig @@ -5,8 +5,6 @@ echo "Configuring stage 3.2 ..." # first a few variables CONFIG="${FUTURE_ROOT}/opt/openslx/config" -UUID=$(dmidecode -s system-uuid | grep -m1 -E '^[0-9A-F\-]{36}$') - ######################################################################### # # This function downloads the config containing environment variables @@ -15,7 +13,7 @@ fetch_sysconfig() { [ -e "$CONFIG" ] && grep -E '^#_RCONFIG_TAG$' "$CONFIG" > /dev/null \ && echo "Config already fetched." && return 0 - download "${SLX_BASE_PATH}/config?uuid=${UUID}" "${CONFIG}-remote" || return 1 + download "${SLX_BASE_PATH}/config" "${CONFIG}-remote" || return 1 echo "# Config fetched from $URL" >> "$CONFIG" echo "#_RCONFIG_TAG" >> "$CONFIG" @@ -28,7 +26,7 @@ fetch_sysconfig() { fetch_config_files() { [ -e "${CONFIG}.tgz" ] && echo "config.tgz already downloaded." && return 0 - download "${SLX_BASE_PATH}/config.tgz?uuid=${UUID}" "${CONFIG}.tgz" + download "${SLX_BASE_PATH}/config.tgz" "${CONFIG}.tgz" } @@ -98,6 +96,17 @@ HEREEND # fetch_sysconfig || drop_shell "Could not download remote config" +if ! ash -n "${CONFIG}-remote"; then + echo -e "\n\tFATAL: Could not download configuration!" + echo -e "\tAborting boot since the system would be in an unusable state." + echo -en "\tRebooting in 60 seconds" + timeout=60 + while [ $(( timeout-- )) -gt 0 ]; do + echo -n "." + sleep 1 + done + echo b > /proc/sysrq-trigger +fi . "${CONFIG}-remote" || drop_shell "Could not source remote config" fetch_config_files || drop_shell "Could not download config.tgz" update_sysconfig || drop_shell "Could not update sysconfig" |