fixed indentation
This commit is contained in:
@@ -24,25 +24,25 @@ load_autoconf()
|
||||
local prefix="$MYPATH/conf/auto"
|
||||
|
||||
if [[ -e $prefix/$SYS_ARCH.conf.sh ]]; then
|
||||
. $prefix/$SYS_ARCH.conf.sh
|
||||
. $prefix/$SYS_ARCH.conf.sh
|
||||
fi
|
||||
if [[ -e $prefix/$SYS_DIST.conf.sh ]]; then
|
||||
. $prefix/$SYS_DIST.conf.sh
|
||||
. $prefix/$SYS_DIST.conf.sh
|
||||
fi
|
||||
if [[ -e $prefix/$SYS_DIST-$SYS_ARCH.conf.sh ]]; then
|
||||
. $prefix/$SYS_DIST-$SYS_ARCH.conf.sh
|
||||
. $prefix/$SYS_DIST-$SYS_ARCH.conf.sh
|
||||
fi
|
||||
if [[ -e $prefix/$SYS_DIST-$SYS_VER.conf.sh ]]; then
|
||||
. $prefix/$SYS_DIST-$SYS_VER.conf.sh
|
||||
. $prefix/$SYS_DIST-$SYS_VER.conf.sh
|
||||
fi
|
||||
if [[ -n $SYS_CODE && -e $prefix/$SYS_DIST-$SYS_CODE.conf.sh ]]; then
|
||||
. $prefix/$SYS_DIST-$SYS_CODE.conf.sh
|
||||
. $prefix/$SYS_DIST-$SYS_CODE.conf.sh
|
||||
fi
|
||||
if [[ -e $prefix/$SYS_DIST-$SYS_VER-$SYS_ARCH.conf.sh ]]; then
|
||||
. $prefix/$SYS_DIST-$SYS_VER-$SYS_ARCH.conf.sh
|
||||
. $prefix/$SYS_DIST-$SYS_VER-$SYS_ARCH.conf.sh
|
||||
fi
|
||||
if [[ -n $SYS_CODE && -e $prefix/$SYS_DIST-$SYS_CODE-$SYS_ARCH.conf.sh ]]; then
|
||||
. $prefix/$SYS_DIST-$SYS_CODE-$SYS_ARCH.conf.sh
|
||||
. $prefix/$SYS_DIST-$SYS_CODE-$SYS_ARCH.conf.sh
|
||||
fi
|
||||
|
||||
unset prefix
|
||||
@@ -58,31 +58,31 @@ export -f load_autoconf
|
||||
load_configuration()
|
||||
{
|
||||
if [[ -n $CONFFILES ]]; then
|
||||
local f=
|
||||
for f in $CONFFILES; do
|
||||
prnt I "Loading $f manually specified."
|
||||
if [[ -s $f ]]; then
|
||||
. $f
|
||||
else
|
||||
prnt E "The $f file doesn't exists or is empty."
|
||||
die 6 --force
|
||||
fi
|
||||
done
|
||||
unset f
|
||||
local f=
|
||||
for f in $CONFFILES; do
|
||||
prnt I "Loading $f manually specified."
|
||||
if [[ -s $f ]]; then
|
||||
. $f
|
||||
else
|
||||
prnt E "The $f file doesn't exists or is empty."
|
||||
die 6 --force
|
||||
fi
|
||||
done
|
||||
unset f
|
||||
else
|
||||
prnt I "Loading configuration..."
|
||||
if [[ -e $MYPATH/conf/$HOSTNAME.conf.sh ]]; then
|
||||
prnt I "A specific configuration will be used."
|
||||
. $MYPATH/conf/$HOSTNAME.conf.sh
|
||||
else
|
||||
if [[ -e $MYPATH/conf/init.conf.sh ]]; then
|
||||
prnt I "A generic configuration will be used."
|
||||
. $MYPATH/conf/init.conf.sh
|
||||
else
|
||||
prnt E "No configuration found, impossible to continue."
|
||||
die 6 --force
|
||||
fi
|
||||
fi
|
||||
prnt I "Loading configuration..."
|
||||
if [[ -e $MYPATH/conf/$HOSTNAME.conf.sh ]]; then
|
||||
prnt I "A specific configuration will be used."
|
||||
. $MYPATH/conf/$HOSTNAME.conf.sh
|
||||
else
|
||||
if [[ -e $MYPATH/conf/init.conf.sh ]]; then
|
||||
prnt I "A generic configuration will be used."
|
||||
. $MYPATH/conf/init.conf.sh
|
||||
else
|
||||
prnt E "No configuration found, impossible to continue."
|
||||
die 6 --force
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
export -f load_configuration
|
||||
@@ -94,8 +94,8 @@ load_prepost_actions()
|
||||
{
|
||||
local prepost=
|
||||
for prepost in $MYPATH/prepost.d/*.sh; do
|
||||
prnt I "Loading prepost actions in $prepost ..."
|
||||
. $prepost
|
||||
prnt I "Loading prepost actions in $prepost ..."
|
||||
. $prepost
|
||||
done
|
||||
unset prepost
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user