summaryrefslogtreecommitdiffstats
path: root/builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh
diff options
context:
space:
mode:
authorJonathan Bauer2019-11-08 14:25:55 +0100
committerJonathan Bauer2019-11-08 14:25:55 +0100
commit7bad74b0476ce6ec85f65c52276ecd13cfcfad3f (patch)
tree6cbe7f5e928b8601480de6592524be2992e76fc4 /builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh
parentMoving sourcing of build.inc to global (diff)
downloadsystemd-init-7bad74b0476ce6ec85f65c52276ecd13cfcfad3f.tar.gz
systemd-init-7bad74b0476ce6ec85f65c52276ecd13cfcfad3f.tar.xz
systemd-init-7bad74b0476ce6ec85f65c52276ecd13cfcfad3f.zip
[conf-tgz] indent
Diffstat (limited to 'builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh')
-rwxr-xr-xbuilder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh36
1 files changed, 18 insertions, 18 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 1c8ace61..89852974 100755
--- a/builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh
+++ b/builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh
@@ -4,26 +4,26 @@
type emergency_shell >/dev/null 2>&1 || source /lib/dracut-lib.sh
- slx_server="$(getarg slxsrv=)"
- slx_server_base="$(getarg slxbase=)"
+slx_server="$(getarg slxsrv=)"
+slx_server_base="$(getarg slxbase=)"
- if [ -z "$SLX_NO_CONFIG_TGZ" ]; then
- # build config.tgz url
- conftgz_url="http://${slx_server#@}/${slx_server_base}/config.tgz"
+if [ -z "$SLX_NO_CONFIG_TGZ" ]; then
+ # build config.tgz url
+ conftgz_url="http://${slx_server#@}/${slx_server_base}/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
+ # 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
- info "Download config.tgz from '$conftgz_url'..."
- slx-tools download_retry -s "${conftgz_url}" > "/etc/config.tgz"
+ fi
+ info "Download config.tgz from '$conftgz_url'..."
+ 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
- fi
+ if [[ ! -s "/etc/config.tgz" ]]; then
+ warn \
+ "Downloading 'config.tgz' from '${slx_server}' failed with: $return_code"
+ # TODO handle error
fi
+fi