From 89164cfdb1e57049c5d173118b6c4b8a71ef9915 Mon Sep 17 00:00:00 2001 From: fatalerrors Date: Thu, 29 Jul 2021 15:58:44 +0200 Subject: [PATCH] added proper headers to source files --- init.sh | 8 +++++++- lib/aaa_errors.sh | 10 +++++++++- lib/display.sh | 7 +++++++ lib/filefct.sh | 8 ++++++++ lib/pkgman.sh | 17 ++++++++++++----- lib/services.sh | 7 +++++++ lib/support.sh | 8 ++++++++ lib/zzz_main_fct.sh | 8 ++++++++ modules/authnz.sh | 5 +++++ modules/conf_disks.sh | 6 ++++++ modules/conf_locale.sh | 7 ++++++- modules/conf_mail.sh | 7 ++++++- modules/conf_ntp.sh | 7 ++++++- modules/conf_ssh.sh | 5 +++++ modules/conf_syslog.sh | 9 ++++++++- modules/create_vm.sh | 7 ++++++- modules/install_chromium.sh | 5 +++++ modules/install_desktop.sh | 5 +++++ modules/install_mkagent.sh | 5 +++++ modules/install_pkg.sh | 5 +++++ modules/install_profile.sh | 9 ++++++++- modules/patch_snmp.sh | 9 ++++++++- modules/template | 8 ++++++++ modules/upgrade_dist.sh | 5 +++++ 24 files changed, 163 insertions(+), 14 deletions(-) diff --git a/init.sh b/init.sh index 140a1e7..0cf8ae5 100755 --- a/init.sh +++ b/init.sh @@ -1,7 +1,13 @@ #!/bin/bash +# ------------------------------------------------------------------------------ # Init: initialise a computer and conform it # Copyright (c) 2019-2021 Geoffray Levasseur - +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause +# ------------------------------------------------------------------------------ + # trace ERR through pipes set -o pipefail diff --git a/lib/aaa_errors.sh b/lib/aaa_errors.sh index 2500d51..2e7b48e 100644 --- a/lib/aaa_errors.sh +++ b/lib/aaa_errors.sh @@ -1,5 +1,12 @@ +# ------------------------------------------------------------------------------ # Error management functions - +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# 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 diff --git a/lib/display.sh b/lib/display.sh index c79a5d6..faba9d2 100644 --- a/lib/display.sh +++ b/lib/display.sh @@ -1,4 +1,11 @@ +# ------------------------------------------------------------------------------ # Some display functions and defines color codes +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause +# ------------------------------------------------------------------------------ # Standard 16 colors display declaration export DEFAULTFG="\e[0;39m" diff --git a/lib/filefct.sh b/lib/filefct.sh index 1354641..4810cd2 100644 --- a/lib/filefct.sh +++ b/lib/filefct.sh @@ -1,3 +1,11 @@ +# ------------------------------------------------------------------------------ +# File manipulation function +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause +# ------------------------------------------------------------------------------ # Define normalised time display, filename friendly stdtime() diff --git a/lib/pkgman.sh b/lib/pkgman.sh index bba26fa..ef160c1 100644 --- a/lib/pkgman.sh +++ b/lib/pkgman.sh @@ -1,6 +1,13 @@ -# Fonctions de gestion de paquets +# ------------------------------------------------------------------------------ +# Package manager integration +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause +# ------------------------------------------------------------------------------ -# Mise à jour de la base de donnée +# Upgrade package database pkgupdt() { prnt I "Mise à jour de la liste des paquets..." @@ -23,7 +30,7 @@ pkginst() } export -f pkginst -# Mise à jour +# Upgrade pkgupgd() { prnt I "Application de la mise à jours du système..." @@ -31,7 +38,7 @@ pkgupgd() } export -f pkgupgd -# Désinstallation +# Uninstallation pkgrem() { prnt I "Désinstallation de paquets..." @@ -46,7 +53,7 @@ pkgrem() } export -f pkgrem -# Désinstallation du superflu +# Cleanup pkgautorem() { prnt I "Désinstallation de paquets superflus..." diff --git a/lib/services.sh b/lib/services.sh index 55fd0d6..be2052d 100644 --- a/lib/services.sh +++ b/lib/services.sh @@ -1,4 +1,11 @@ +# ------------------------------------------------------------------------------ # Services manipulation functions +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause +# ------------------------------------------------------------------------------ # Syntax exec_serv svcname command exec_serv() diff --git a/lib/support.sh b/lib/support.sh index 7cef9aa..b55a5c4 100644 --- a/lib/support.sh +++ b/lib/support.sh @@ -1,3 +1,11 @@ +# ------------------------------------------------------------------------------ +# Base support function +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause +# ------------------------------------------------------------------------------ # Display help disp_help() diff --git a/lib/zzz_main_fct.sh b/lib/zzz_main_fct.sh index 8c6a0fe..b436b7d 100644 --- a/lib/zzz_main_fct.sh +++ b/lib/zzz_main_fct.sh @@ -1,3 +1,11 @@ +# ------------------------------------------------------------------------------ +# Base functions +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause +# ------------------------------------------------------------------------------ read_commandline() { diff --git a/modules/authnz.sh b/modules/authnz.sh index b52e631..ac7d369 100644 --- a/modules/authnz.sh +++ b/modules/authnz.sh @@ -1,5 +1,10 @@ # ------------------------------------------------------------------------------ # Add local or remote users +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause # ------------------------------------------------------------------------------ # Variable: # * WITH_LDAP_KERB: Shall we install requirements for LDAP/Kerberos auth ? diff --git a/modules/conf_disks.sh b/modules/conf_disks.sh index 9278d4b..0c7ad91 100644 --- a/modules/conf_disks.sh +++ b/modules/conf_disks.sh @@ -1,4 +1,10 @@ +# ------------------------------------------------------------------------------ # Secondary drive configuration +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause # ------------------------------------------------------------------------------ # Variable : # * CALCTYPE: filesystem to use (zfs, ext4, xfs) diff --git a/modules/conf_locale.sh b/modules/conf_locale.sh index ff2ccb3..b8bbf96 100644 --- a/modules/conf_locale.sh +++ b/modules/conf_locale.sh @@ -1,5 +1,10 @@ # ------------------------------------------------------------------------------ -# Locale +# Configure locale +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause # ------------------------------------------------------------------------------ # Variable: # * LOCALESET: List of locale that will be supported by system diff --git a/modules/conf_mail.sh b/modules/conf_mail.sh index 0714b00..2d1000e 100644 --- a/modules/conf_mail.sh +++ b/modules/conf_mail.sh @@ -1,5 +1,10 @@ # ------------------------------------------------------------------------------ -# Mail systême +# Mail system +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause # ------------------------------------------------------------------------------ # Variable: # * HOSTNAME: Name of the host diff --git a/modules/conf_ntp.sh b/modules/conf_ntp.sh index 8a60d6b..837b5a4 100644 --- a/modules/conf_ntp.sh +++ b/modules/conf_ntp.sh @@ -1,5 +1,10 @@ # ------------------------------------------------------------------------------ -# NTP +# Configure NTP +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause # ------------------------------------------------------------------------------ # Variable: # * NTPSERVERS: list of NTP servers diff --git a/modules/conf_ssh.sh b/modules/conf_ssh.sh index e403b35..727df74 100644 --- a/modules/conf_ssh.sh +++ b/modules/conf_ssh.sh @@ -1,5 +1,10 @@ # ------------------------------------------------------------------------------ # Configure SSH client and server +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause # ------------------------------------------------------------------------------ # Variable: # none diff --git a/modules/conf_syslog.sh b/modules/conf_syslog.sh index 2fd4d4c..fc33656 100644 --- a/modules/conf_syslog.sh +++ b/modules/conf_syslog.sh @@ -1,4 +1,11 @@ -# Syslog +# ------------------------------------------------------------------------------ +# Configure Rsyslog +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause +# ------------------------------------------------------------------------------ export VER_conf_syslog="0.0.1" diff --git a/modules/create_vm.sh b/modules/create_vm.sh index d3fba83..679a24f 100644 --- a/modules/create_vm.sh +++ b/modules/create_vm.sh @@ -1,5 +1,10 @@ # ------------------------------------------------------------------------------ -# create vm module +# Create VBox VM +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause # ------------------------------------------------------------------------------ # Variable: # To be defined diff --git a/modules/install_chromium.sh b/modules/install_chromium.sh index f3298f2..21b73e1 100644 --- a/modules/install_chromium.sh +++ b/modules/install_chromium.sh @@ -2,6 +2,11 @@ # Since Ubuntu install snapd version of Chromium and we don't want that # we need a special procedure to install Debian Buster version. # Consequently that module is *Ubuntu centric. +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause # ------------------------------------------------------------------------------ # Variable: # none diff --git a/modules/install_desktop.sh b/modules/install_desktop.sh index 6d50290..5d18bf1 100644 --- a/modules/install_desktop.sh +++ b/modules/install_desktop.sh @@ -1,6 +1,11 @@ # ------------------------------------------------------------------------------ # Install desktop environment -- Ubuntu only # Debian version might ask for task-$FLAVOR +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause # ------------------------------------------------------------------------------ # Variable: # * UBUNTU_FLAVOR: Kind of Ubuntu desktop installation (ubuntu for Gnome3, diff --git a/modules/install_mkagent.sh b/modules/install_mkagent.sh index 20ba72f..93c2932 100644 --- a/modules/install_mkagent.sh +++ b/modules/install_mkagent.sh @@ -1,5 +1,10 @@ # ------------------------------------------------------------------------------ # Install check_mk agent using xinetd superserver +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause # ------------------------------------------------------------------------------ # Variable: # * MK_SERVER: Server IP address diff --git a/modules/install_pkg.sh b/modules/install_pkg.sh index f70de4a..de7317c 100644 --- a/modules/install_pkg.sh +++ b/modules/install_pkg.sh @@ -1,5 +1,10 @@ # ------------------------------------------------------------------------------ # Install or remove packages +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause # ------------------------------------------------------------------------------ # Variable: # * PKGS_RMLIST: packages to remove diff --git a/modules/install_profile.sh b/modules/install_profile.sh index 639a466..01fdf88 100644 --- a/modules/install_profile.sh +++ b/modules/install_profile.sh @@ -1,4 +1,11 @@ -# Profile +# ------------------------------------------------------------------------------ +# Profile installation +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause +# ------------------------------------------------------------------------------ export VER_install_profile="0.0.1" diff --git a/modules/patch_snmp.sh b/modules/patch_snmp.sh index 410fa51..d1d4fbf 100644 --- a/modules/patch_snmp.sh +++ b/modules/patch_snmp.sh @@ -1,4 +1,11 @@ -# Supervision +# ------------------------------------------------------------------------------ +# SNMP monitoring conf +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause +# ------------------------------------------------------------------------------ export VER_patch_snmp="0.0.1" diff --git a/modules/template b/modules/template index c31cc8f..fc5ace3 100644 --- a/modules/template +++ b/modules/template @@ -19,6 +19,14 @@ # des fichiers concernés (sauf conf) ET un commit dans git. # # # ##Description du module @template@ +##Copyright (c) Year Your Name +##------------------------------------------------------------------------------ +##This file is distributed under 3-clause BSD license. +##The complete license agreement can be obtained at: +##https://opensource.org/licenses/BSD-3-Clause +##------------------------------------------------------------------------------ +##Variable list: +##------------------------------------------------------------------------------ # Version du module export VER_@template@="0.0.1" diff --git a/modules/upgrade_dist.sh b/modules/upgrade_dist.sh index b5c0da3..718b67b 100644 --- a/modules/upgrade_dist.sh +++ b/modules/upgrade_dist.sh @@ -1,6 +1,11 @@ # ------------------------------------------------------------------------------ # Distribution upgrade module, should be ran prior any other module (also # configure APT) +# Copyright (c) 2019-2021 Geoffray Levasseur +# ------------------------------------------------------------------------------ +# This file is distributed under 3-clause BSD license. +# The complete license agreement can be obtained at: +# https://opensource.org/licenses/BSD-3-Clause # ------------------------------------------------------------------------------ # Variable: # * PROXYAPT: Proxy to use with APT (eg. APT Cacher)