From 3eff3fcd9db6ac10e7df8f76f75c5d14e5e66568 Mon Sep 17 00:00:00 2001 From: Thiago Abdo Date: Tue, 15 Oct 2019 17:05:20 +0200 Subject: Removes logging configuration from exception, probabily in bash 4.4.19 they does not work Signed-off-by: Thiago Abdo --- .../dnbd3-rootfs/hooks/copy-openslx-configuration-into-newroot.sh | 6 +++--- builder/modules.d/dnbd3-rootfs/hooks/mount-root-device.sh | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/builder/modules.d/dnbd3-rootfs/hooks/copy-openslx-configuration-into-newroot.sh b/builder/modules.d/dnbd3-rootfs/hooks/copy-openslx-configuration-into-newroot.sh index 12dab27d..bb8feccc 100755 --- a/builder/modules.d/dnbd3-rootfs/hooks/copy-openslx-configuration-into-newroot.sh +++ b/builder/modules.d/dnbd3-rootfs/hooks/copy-openslx-configuration-into-newroot.sh @@ -6,13 +6,13 @@ core.import exceptions core.import logging type emergency_shell >/dev/null 2>&1 || source /lib/dracut-lib.sh # endregion -exceptions.try -{ -source "/etc/openslx" logging.set_commands_level debug logging.set_level debug [[ "$SLX_LOG_FILE_PATH" == "" ]] && SLX_LOG_FILE_PATH=/var/log/openslx logging.set_log_file "$SLX_LOG_FILE_PATH" +exceptions.try +{ +source "/etc/openslx" mkdir --parents "${NEWROOT}/opt/openslx" cp "/etc/openslx" "${NEWROOT}/opt/openslx/config" diff --git a/builder/modules.d/dnbd3-rootfs/hooks/mount-root-device.sh b/builder/modules.d/dnbd3-rootfs/hooks/mount-root-device.sh index a5aceab6..36e4f091 100755 --- a/builder/modules.d/dnbd3-rootfs/hooks/mount-root-device.sh +++ b/builder/modules.d/dnbd3-rootfs/hooks/mount-root-device.sh @@ -1,17 +1,19 @@ #!/usr/bin/env bash # -*- coding: utf-8 -*- # region imports + +sleep 10 source '/usr/lib/rebash/core.sh' core.import exceptions type emergency_shell >/dev/null 2>&1 || source /lib/dracut-lib.sh # endregion -exceptions.try -{ logging.set_commands_level debug logging.set_level debug [[ "$SLX_LOG_FILE_PATH" == "" ]] && SLX_LOG_FILE_PATH=/var/log/openslx logging.set_log_file "$SLX_LOG_FILE_PATH" +exceptions.try +{ if ! getarg root=; then source "/etc/openslx" mount "$SLX_DNBD3_DEVICE_COW" "$NEWROOT" $SLX_MOUNT_ROOT_OPTIONS -- cgit v1.2.3-55-g7522