summaryrefslogtreecommitdiffstats
path: root/builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh
diff options
context:
space:
mode:
authorJonathan Bauer2019-09-06 17:34:24 +0200
committerJonathan Bauer2019-09-06 17:34:24 +0200
commit5265faaac56fce5a395288210a8bec21598f10de (patch)
tree21943ad967161be7b2bd8c92882e95e2efe857c9 /builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh
parentformatting (diff)
downloadsystemd-init-5265faaac56fce5a395288210a8bec21598f10de.tar.gz
systemd-init-5265faaac56fce5a395288210a8bec21598f10de.tar.xz
systemd-init-5265faaac56fce5a395288210a8bec21598f10de.zip
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.sh20
1 files changed, 3 insertions, 17 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 079d45be..1c8ace61 100755
--- a/builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh
+++ b/builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh
@@ -1,19 +1,11 @@
#!/usr/bin/env bash
# -*- coding: utf-8 -*-
-source '/usr/lib/rebash/core.sh'
-core.import exceptions
-core.import logging
type emergency_shell >/dev/null 2>&1 || source /lib/dracut-lib.sh
-exceptions.try
-{
- # NOTE: "getarg" raises an exception so deactivate exceptions for now.
- exceptions.deactivate
slx_server="$(getarg slxsrv=)"
slx_server_base="$(getarg slxbase=)"
- exceptions.activate
if [ -z "$SLX_NO_CONFIG_TGZ" ]; then
# build config.tgz url
@@ -26,18 +18,12 @@ exceptions.try
conftgz_url="${conftgz_url}?uuid=${uuid}"
fi
fi
- logging.info "Download config.tgz from '$conftgz_url'..."
+ info "Download config.tgz from '$conftgz_url'..."
slx-tools download_retry -s "${conftgz_url}" > "/etc/config.tgz"
if [[ ! -s "/etc/config.tgz" ]]; then
- logging.warn \
+ warn \
"Downloading 'config.tgz' from '${slx_server}' failed with: $return_code"
- return 1
+ # TODO handle error
fi
fi
-}
-exceptions.catch
-{
- logging.error "$exceptions_last_traceback"
- emergency_shell "error in ${BASH_SOURCE[0]}"
-}