diff options
author | Renato Botelho <renato@netgate.com> | 2015-09-25 13:46:00 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-09-25 13:46:00 -0300 |
commit | d61a194df759abc95605053ba89a9f635189ce22 (patch) | |
tree | a11e93272534979914ca48de4286287583c64fc1 /src/usr/local | |
parent | ac56271c6e4a04ad6f3c6ec85c289bb95eb5a48a (diff) | |
download | pfsense-d61a194df759abc95605053ba89a9f635189ce22.zip pfsense-d61a194df759abc95605053ba89a9f635189ce22.tar.gz |
Print return code when _GUI_CALL is not empty, used by GUI to check rc of a process that runs in bg
Diffstat (limited to 'src/usr/local')
-rwxr-xr-x | src/usr/local/sbin/pfSense-upgrade | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/usr/local/sbin/pfSense-upgrade b/src/usr/local/sbin/pfSense-upgrade index 4d78072..1960548 100755 --- a/src/usr/local/sbin/pfSense-upgrade +++ b/src/usr/local/sbin/pfSense-upgrade @@ -118,11 +118,12 @@ _exit() { rm -f ${pid_file} fi - if [ -n "${1}" ]; then - exit ${1} - fi + local _rc=${1:-"0"} + + [ -n "${_GUI_CALL}" ] \ + && _echo "__RC=${_rc}" - exit 0 + exit ${_rc} } pkg_upgrade_first_step() { |