few improvements, consistency fixes
This commit is contained in:
15
init.sh
15
init.sh
@@ -44,9 +44,6 @@ export MYPATH=$(dirname $(realpath -s $0))
|
||||
# Get hostname
|
||||
export HOSTNAME=$(hostname)
|
||||
|
||||
# System architecture
|
||||
export SYS_ARCH=$(uname -m)
|
||||
|
||||
# Load libraries
|
||||
for lib in $MYPATH/lib/*.sh; do
|
||||
. $lib
|
||||
@@ -69,13 +66,13 @@ function_exists prnt || (
|
||||
exit 3
|
||||
)
|
||||
|
||||
# Set system dependent vars
|
||||
get_os_version $(read_os_release)
|
||||
|
||||
# ======================
|
||||
# ==== Main Program ====
|
||||
# ======================
|
||||
|
||||
# Set system dependent vars
|
||||
set_sys_vars $(uname -m) $(get_os_version)
|
||||
|
||||
# Initializing global variables
|
||||
export CHECK_ONLY=false
|
||||
export JUMP=false
|
||||
@@ -109,7 +106,11 @@ exec > >(tee -a $LOGFILE)
|
||||
exec 2> >(tee -a $LOGFILE >&2)
|
||||
prnt I "Démarrage d'init version $VERSION."
|
||||
prnt I "Le fichier de log est $LOGFILE."
|
||||
prnt I "Lancé sur $SYS_DIST version $SYS_VER ($SYS_CODE) architecture $SYS_ARCH"
|
||||
if [[ -n $SYS_CODE ]]; then
|
||||
prnt I "Lancé sur $SYS_DIST version $SYS_VER ($SYS_CODE) architecture $SYS_ARCH"
|
||||
else
|
||||
prnt I "Lancé sur $SYS_DIST version $SYS_VER architecture $SYS_ARCH"
|
||||
fi
|
||||
|
||||
# -- Cannot be a function ends here
|
||||
|
||||
|
||||
Reference in New Issue
Block a user