diff options
author | Renato Botelho <renato@netgate.com> | 2015-09-11 15:25:27 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-09-11 15:25:27 -0300 |
commit | 57e498d340982762a4cf7f0413e03c32f16ca2cd (patch) | |
tree | 19c5ef0891751bc5fbe2e3422aa2e93cef827993 /src | |
parent | 72ce3e047ffce726cf72da4d54d8e7aeb3acb815 (diff) | |
download | pfsense-57e498d340982762a4cf7f0413e03c32f16ca2cd.zip pfsense-57e498d340982762a4cf7f0413e03c32f16ca2cd.tar.gz |
Move _echo() to improve readability
Diffstat (limited to 'src')
-rwxr-xr-x | src/usr/local/sbin/pfsense-upgrade.sh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/usr/local/sbin/pfsense-upgrade.sh b/src/usr/local/sbin/pfsense-upgrade.sh index da37d76..8e963cd 100755 --- a/src/usr/local/sbin/pfsense-upgrade.sh +++ b/src/usr/local/sbin/pfsense-upgrade.sh @@ -52,16 +52,6 @@ if [ -f "${logfile}" ]; then rm -f ${logfile} fi -_echo() { - local _n="" - if [ "${1}" = "-n" ]; then - shift - _n="-n" - fi - - echo ${_n} "${1}" | tee -a ${logfile} -} - # pkg should not ask for confirmations export ASSUME_ALWAYS_YES=true @@ -97,6 +87,16 @@ usage() { _echo "Usage: $(basename ${0}) [-d] [-y] [-c]" } +_echo() { + local _n="" + if [ "${1}" = "-n" ]; then + shift + _n="-n" + fi + + echo ${_n} "${1}" | tee -a ${logfile} +} + _exec() { local _cmd="${1}" local _msg="${2}" |