V8.03.768.2025.06.18
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -49,6 +49,15 @@ for arg in "$@"; do case "${arg,,}" in -h|--help) . ./lib/lib_usage.sh; usage
|
||||
for arg in "$@"; do case "${arg,,}" in -v|--version) printf "\e[95mCISS.debian.live.builder Version: %s\e[0m\n" "${VAR_VERSION}"; exit 0;; esac; done
|
||||
declare -gx VAR_SETUP="true"
|
||||
|
||||
### VERY EARLY CHECK FOR XTRACE DEBUGGING
|
||||
if [[ $* == *" --debug "* ]]; then
|
||||
. ./lib/lib_debug.sh
|
||||
. ./lib/lib_debug_header.sh
|
||||
debugger "${@}"
|
||||
else
|
||||
declare -gx VAR_EARLY_DEBUG="false"
|
||||
fi
|
||||
|
||||
### SOURCING VARIABLES
|
||||
[[ "${VAR_SETUP}" == true ]] && {
|
||||
. ./var/bash.var.sh
|
||||
@@ -73,8 +82,6 @@ declare -gx VAR_SETUP="true"
|
||||
. ./lib/lib_clean_screen.sh
|
||||
. ./lib/lib_clean_up.sh
|
||||
. ./lib/lib_copy_integrity.sh
|
||||
. ./lib/lib_debug.sh
|
||||
. ./lib/lib_debug_header.sh
|
||||
. ./lib/lib_hardening_root_pw.sh
|
||||
. ./lib/lib_hardening_ssh.sh
|
||||
. ./lib/lib_hardening_ultra.sh
|
||||
@@ -90,29 +97,20 @@ declare -gx VAR_SETUP="true"
|
||||
. ./lib/lib_usage.sh
|
||||
}
|
||||
|
||||
### VERY EARLY CHECK FOR XTRACE DEBUGGING
|
||||
if [[ $* == *" --debug "* ]]; then
|
||||
debugger "${@}"
|
||||
else
|
||||
declare -gx VAR_EARLY_DEBUG=false
|
||||
fi
|
||||
|
||||
### ADVISORY LOCK
|
||||
exec 127>/var/lock/ciss_live_builder.lock || {
|
||||
. ./var/global.var.sh
|
||||
printf "\e[91m❌ Cannot open lockfile for writing! Bye... \e[0m\n" >&2
|
||||
exit "${ERR_FLOCK_WRTG}"
|
||||
}
|
||||
|
||||
if ! flock -x -n 127; then
|
||||
. ./var/global.var.sh
|
||||
printf "\e[91m❌ Another instance is running! Bye...\e[0m\n" >&2
|
||||
exit "${ERR_FLOCK_COLL}"
|
||||
fi
|
||||
|
||||
### VERY EARLY CHECK FOR AUTOBUILD MODE
|
||||
declare -gx VAR_HANDLER_AUTOBUILD=false
|
||||
for arg in "$@"; do case "${arg,,}" in -a=*|--autobuild=*) declare -gx VAR_HANDLER_AUTOBUILD=true; declare -gx VAR_KERNEL="${arg#*=}";; esac; done
|
||||
declare -gx VAR_HANDLER_AUTOBUILD="false"
|
||||
for arg in "$@"; do case "${arg,,}" in -a=*|--autobuild=*) declare -gx VAR_HANDLER_AUTOBUILD="true"; declare -gx VAR_KERNEL="${arg#*=}";; esac; done
|
||||
unset arg
|
||||
for dir in /usr/local/sbin /usr/sbin; do case ":${PATH}:" in *":${dir}:"*) ;; *) PATH="${PATH}:${dir}" ;; esac; done; export PATH; unset dir
|
||||
|
||||
|
||||
Reference in New Issue
Block a user