Centralize function name. Update a comment while here.

This commit is contained in:
Devin Teske 2014-03-07 20:24:59 +00:00
parent 67602532c3
commit 4bed406fb7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=262900

View File

@ -95,7 +95,7 @@ f_dispatch()
# Load a script (usually filled with reswords). If $file is missing or NULL, # Load a script (usually filled with reswords). If $file is missing or NULL,
# use one of the following instead (in order): # use one of the following instead (in order):
# #
# $configFile # $configFile (global)
# install.cfg # install.cfg
# /stand/install.fg # /stand/install.fg
# /tmp/install.cfg # /tmp/install.cfg
@ -107,9 +107,10 @@ f_dispatch()
# #
f_script_load() f_script_load()
{ {
local funcname=f_script_load
local script="$1" config_file retval=$SUCCESS local script="$1" config_file retval=$SUCCESS
f_dprintf "f_script_load: script=[%s]" "$script" f_dprintf "$funcname: script=[%s]" "$script"
if [ ! "$script" ]; then if [ ! "$script" ]; then
f_getvar $VAR_CONFIG_FILE config_file f_getvar $VAR_CONFIG_FILE config_file
for script in \ for script in \
@ -129,11 +130,11 @@ f_script_load()
setvar $VAR_NONINTERACTIVE yes setvar $VAR_NONINTERACTIVE yes
if [ "$script" = "-" ]; then if [ "$script" = "-" ]; then
f_dprintf "f_script_load: Loading script from stdin" f_dprintf "$funcname: Loading script from stdin"
eval "$( cat )" eval "$( cat )"
retval=$? retval=$?
else else
f_dprintf "f_script_load: Loading script \`%s'" "$script" f_dprintf "$funcname: Loading script \`%s'" "$script"
if [ ! -e "$script" ]; then if [ ! -e "$script" ]; then
f_show_msg "$msg_unable_to_open" "$script" f_show_msg "$msg_unable_to_open" "$script"
return $FAILURE return $FAILURE