added proper headers to source files

This commit is contained in:
fatalerrors
2021-07-29 15:58:44 +02:00
parent ec2bb9d898
commit 89164cfdb1
24 changed files with 163 additions and 14 deletions

View File

@@ -1,5 +1,12 @@
# ------------------------------------------------------------------------------
# Error management functions
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# ------------------------------------------------------------------------------
# This file is distributed under 3-clause BSD license.
# The complete license agreement can be obtained at:
# https://opensource.org/licenses/BSD-3-Clause
# ------------------------------------------------------------------------------
# Exit with error
function die()
{
@@ -63,6 +70,7 @@ function backtrace
echo "=============================="
}
# Test and exit if not root (or any UID 0 user)
check_root()
{
[[ $NO_ROOT_CHECK == true ]] && return 0