Fix banner
Tento commit je obsažen v:
@@ -2,6 +2,10 @@
|
||||
# Common functions for the lab scripts
|
||||
# Copyright 2021 Bryan C. Roessler
|
||||
|
||||
# Don't run this script directly
|
||||
[[ "${BASH_SOURCE[0]}" == "${0}" ]] && exit 0
|
||||
|
||||
|
||||
ask_ok() {
|
||||
read -r -p "$* [y/N]" response
|
||||
response=${response,,}
|
||||
@@ -15,6 +19,7 @@ is_root() {
|
||||
[[ $user != "root" ]] && echo "Script must be run with sudo rights!" && exit 1
|
||||
}
|
||||
|
||||
|
||||
if ! type -t readarray >/dev/null; then
|
||||
readarray() {
|
||||
local cmd opt t v=MAPFILE
|
||||
@@ -48,4 +53,4 @@ if ! type -t readarray >/dev/null; then
|
||||
eval "${v}+=(\"$line\")"
|
||||
done
|
||||
}
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install motd scripts
|
||||
|
||||
# shellcheck source=./functions
|
||||
[[ -f functions ]] && . functions || exit 1
|
||||
|
||||
is_root
|
||||
@@ -15,6 +16,7 @@ if [[ -v DEBUG ]]; then
|
||||
banner="banner.sh"
|
||||
else
|
||||
banner="$profiledir/banner.sh"
|
||||
[[ -f ./functions ]] && cp functions "$profiledir"
|
||||
fi
|
||||
|
||||
cat <<- 'EOF' > "$banner"
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele