summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-software.sh
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-11-12 19:39:30 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-11-12 19:39:30 +0100
commite4a5db7f3500b3706a479133b8d7b1465a570da5 (patch)
treeac5346fc29701e6a7ba50184bb6f69eff62c7cdc /src/core/libs/lib-software.sh
parent119bc8fb89b78528a792335460ac200bf14d5804 (diff)
cleaner handling of exit code and running state in run_background + installpkg exit code fix
Diffstat (limited to 'src/core/libs/lib-software.sh')
-rw-r--r--src/core/libs/lib-software.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/libs/lib-software.sh b/src/core/libs/lib-software.sh
index 83ea100..04f4498 100644
--- a/src/core/libs/lib-software.sh
+++ b/src/core/libs/lib-software.sh
@@ -14,7 +14,8 @@ run_mkinitcpio()
target_special_fs off
# alert the user to fatal errors
- [ $(cat /tmp/.mkinitcpio-retcode) -ne 0 ] && show_warning "MKINITCPIO FAILED - SYSTEM MAY NOT BOOT" "/tmp/mkinitcpio.log" text
+ [ $mkinitcpio_exitcode -ne 0 ] && show_warning "MKINITCPIO FAILED - SYSTEM MAY NOT BOOT" "/tmp/mkinitcpio.log" text
+ return $mkinitcpio_exitcode
}
@@ -28,23 +29,22 @@ installpkg() {
wait_for pacman-installpkg
+
local _result=''
- if [ $(cat /tmp/.pacman-retcode) -ne 0 ]; then
+ if [ ${pacman-installpkg_exitcode} -ne 0 ]; then
_result="Installation Failed (see errors below)"
echo -e "\nPackage Installation FAILED." >>/tmp/pacman.log
else
_result="Installation Complete"
echo -e "\nPackage Installation Complete." >>/tmp/pacman.log
fi
- rm /tmp/.pacman-retcode
show_warning "$_result" "/tmp/pacman.log" text || return 1
target_special_fs off
-
sync
- return 0
+ return ${pacman-installpkg_exitcode}
}