summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2018-11-12 12:30:02 +0100
committerJonathan Bauer2018-11-12 17:30:33 +0100
commitc37892123e41cd1da4e9988d16c6b640ea569229 (patch)
treec4bd940d16155dcc305ddd24e87c934f40a68edf
parent[conf-tgz] increase hook scripts ordering index (diff)
downloadsystemd-init-c37892123e41cd1da4e9988d16c6b640ea569229.tar.gz
systemd-init-c37892123e41cd1da4e9988d16c6b640ea569229.tar.xz
systemd-init-c37892123e41cd1da4e9988d16c6b640ea569229.zip
[conf-tgz] chown files extracted
CAVE: all files will be chown'ed to 0:0 !
-rwxr-xr-xbuilder/modules.d/conf-tgz/hooks/unpack-config-tgz.sh7
1 files changed, 1 insertions, 6 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 752527e3..5d3b1c6f 100755
--- a/builder/modules.d/conf-tgz/hooks/unpack-config-tgz.sh
+++ b/builder/modules.d/conf-tgz/hooks/unpack-config-tgz.sh
@@ -10,13 +10,12 @@ type emergency_shell >/dev/null 2>&1 || source /lib/dracut-lib.sh
temporary_extract_directory="$(mktemp -d)"
exceptions.try
{
- logging.set_commands_level debug
- logging.set_level debug
exceptions.activate
if [[ -e "/etc/config.tgz" ]]; then
tar --extract --preserve-permissions \
--file="/etc/config.tgz" \
--directory="$temporary_extract_directory"
+ chown -R 0:0 "$temporary_extract_directory"
fi
}
exceptions.catch
@@ -30,8 +29,6 @@ source "/etc/openslx"
if [[ -n "$SLX_LOCAL_CONFIGURATION" ]]; then
exceptions.try
{
- logging.set_commands_level debug
- logging.set_level debug
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'."
@@ -52,8 +49,6 @@ fi
# now just copy everything from the temporary_extract_directory to the future root
exceptions.try
{
- logging.set_commands_level debug
- logging.set_level debug
exceptions.activate
cd "${temporary_extract_directory}"
# purge openslx-configs/