added lib/utils.sh and reorganised some files according to it
This commit is contained in:
@@ -101,30 +101,4 @@ show_version()
|
||||
}
|
||||
export -f show_version
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Get module name from module file
|
||||
get_mod_name()
|
||||
{
|
||||
if [[ $# -ne 1 ]]; then
|
||||
prnt E "get_mod_name(): Bad number of parameters."
|
||||
die 11 --force
|
||||
fi
|
||||
echo $(basename $1 | cut -f 1 -d '.')
|
||||
}
|
||||
export -f get_mod_name
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Set system proxy vars
|
||||
set_system_proxy()
|
||||
{
|
||||
# Declare proxy system vars if needed and if not already declared
|
||||
if [[ -n $PROXYSRV && -n $PROXYSRVPORT && -z $NO_PROXY ]]; then
|
||||
export http_proxy=${http_proxy:-"http://$PROXYSRV:$PROXYSRVPORT/"}
|
||||
export https_proxy=${https_proxy:-"http://$PROXYSRV:$PROXYSRVPORT/"}
|
||||
fi
|
||||
}
|
||||
export -f set_system_proxy
|
||||
|
||||
# EOF
|
||||
|
||||
Reference in New Issue
Block a user