summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2019-02-18 15:21:12 +0100
committerJonathan Bauer2019-02-18 15:21:12 +0100
commitb4490c0e69ee721f34b2370a9451ef689505d79c (patch)
tree6838bbcb3c012112255c7e8ffa0b621ab9e2884a
parent[slx-partitioner] add head and tail binaries (diff)
downloadsystemd-init-b4490c0e69ee721f34b2370a9451ef689505d79c.tar.gz
systemd-init-b4490c0e69ee721f34b2370a9451ef689505d79c.tar.xz
systemd-init-b4490c0e69ee721f34b2370a9451ef689505d79c.zip
[conf-tgz] do not emergency_shell if SLX_LOCAL_CONFIGURATION is missing
-rwxr-xr-xbuilder/modules.d/conf-tgz/hooks/unpack-config-tgz.sh12
1 files changed, 4 insertions, 8 deletions
diff --git a/builder/modules.d/conf-tgz/hooks/unpack-config-tgz.sh b/builder/modules.d/conf-tgz/hooks/unpack-config-tgz.sh
index 7bae4713..588a65d3 100755
--- a/builder/modules.d/conf-tgz/hooks/unpack-config-tgz.sh
+++ b/builder/modules.d/conf-tgz/hooks/unpack-config-tgz.sh
@@ -22,7 +22,6 @@ exceptions.catch
{
logging.error "Failed to extract '/etc/config.tgz' to '$temporary_extract_directory'."
logging.error "$exceptions_last_traceback"
- emergency_shell "error in ${BASH_SOURCE[0]}"
}
# extracted to temporary directory, now check for SLX_LOCAL_CONFIGURATION
source "/etc/openslx"
@@ -31,19 +30,17 @@ if [[ -n "$SLX_LOCAL_CONFIGURATION" ]]; then
{
exceptions.activate
if [[ ! -d "${temporary_extract_directory}/openslx-configs/${SLX_LOCAL_CONFIGURATION}" ]]; then
- logging.warn "SLX_LOCAL_CONFIGURATION is set but no corresponding folder found in '/etc/config.tgz'."
- emergency_shell "error in ${BASH_SOURCE[0]}"
+ logging.warn "SLX_LOCAL_CONFIGURATION is set but no corresponding folder found in '/etc/config.tgz'. Ignoring..."
+ else
+ cd "${temporary_extract_directory}/openslx-configs/${SLX_LOCAL_CONFIGURATION}"
+ tar --create --preserve-permissions * | tar --extract --preserve-permissions --directory "${temporary_extract_directory}"
fi
- # still here? then process to merge the localized configuration files with the common files.
- cd "${temporary_extract_directory}/openslx-configs/${SLX_LOCAL_CONFIGURATION}"
- tar --create --preserve-permissions * | tar --extract --preserve-permissions --directory "${temporary_extract_directory}"
}
exceptions.catch
{
# errors here are not critical, so no emergency shell
logging.error "Failed to merge local configuration files for '$SLX_LOCAL_CONFIGURATION'."
logging.error "$exceptions_last_traceback"
- emergency_shell "error in ${BASH_SOURCE[0]}"
}
fi
# now just copy everything from the temporary_extract_directory to the future root
@@ -60,5 +57,4 @@ exceptions.catch
# errors here are not critical, so no emergency shell
logging.error "Failed to copy extracted configuration files to '$NEWROOT'."
logging.error "$exceptions_last_traceback"
- emergency_shell "error in ${BASH_SOURCE[0]}"
}