diff options
Diffstat (limited to 'builder/modules.d/dnbd3-rootfs/hooks/copy-openslx-configuration-into-newroot.sh')
-rwxr-xr-x | builder/modules.d/dnbd3-rootfs/hooks/copy-openslx-configuration-into-newroot.sh | 28 |
1 files changed, 28 insertions, 0 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 new file mode 100755 index 00000000..6a56f857 --- /dev/null +++ b/builder/modules.d/dnbd3-rootfs/hooks/copy-openslx-configuration-into-newroot.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# -*- coding: utf-8 -*- +# region imports +source '/usr/lib/rebash/core.sh' +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" + +mkdir --parents "${NEWROOT}${SLX_CONFIGURATION_LOCATION}" +cp "/etc/openslx" "${NEWROOT}${SLX_CONFIGURATION_LOCATION}" +} +exceptions.catch +{ + logging.error "$exceptions_last_traceback" + emergency_shell "error in ${BASH_SOURCE[0]}" +} +# region vim modline +# vim: set tabstop=4 shiftwidth=4 expandtab: +# vim: foldmethod=marker foldmarker=region,endregion: +# endregion |