summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-11-13 13:43:34 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-11-13 13:43:34 +0100
commit20c1784704c6ca82476a2fa1a8391a57b91eac81 (patch)
treeb2cc4c03311dfc94a3b8626ae3e76ba9f0a80829 /src/core
parent33dd56f6e3725133e7d537db4d25b5563d26f2e8 (diff)
debugging info in run_background + better logfile location for pacman
Diffstat (limited to 'src/core')
-rw-r--r--src/core/libs/lib-misc.sh6
-rw-r--r--src/core/libs/lib-software.sh10
2 files changed, 10 insertions, 6 deletions
diff --git a/src/core/libs/lib-misc.sh b/src/core/libs/lib-misc.sh
index c22a22b..843c105 100644
--- a/src/core/libs/lib-misc.sh
+++ b/src/core/libs/lib-misc.sh
@@ -12,12 +12,16 @@ run_background ()
[ -z "$2" ] && die_error "run_background needs a command to execute!"
[ -z "$3" ] && die_error "run_background needs a logfile to redirect output to!"
+ debug "run_background called. identifier: $1, command: $2, logfile: $3"
( \
touch /home/arch/fifa/runtime/$1-running
+ debug "run_background starting $1: $2 >>$3 2>&1"
echo "$1 progress ..." > $3; \
echo >> $3; \
eval "$2" >>$3 2>&1
- read $1_exitcode <<< $?
+ var_exit=${1}_exitcode
+ read $var_exit <<< $?
+ debug "run_background done with $1: exitcode (\$$1_exitcode): "${!var_exit}" .Logfile $3"
echo >> $3
rm -f /home/arch/fifa/runtime/$1-running
) &
diff --git a/src/core/libs/lib-software.sh b/src/core/libs/lib-software.sh
index 04f4498..f93f1a5 100644
--- a/src/core/libs/lib-software.sh
+++ b/src/core/libs/lib-software.sh
@@ -24,8 +24,8 @@ run_mkinitcpio()
installpkg() {
notify "Package installation will begin now. You can watch the output in the progress window. Please be patient."
target_special_fs on
- run_background pacman-installpkg "$PACMAN_TARGET -S $TARGET_PACKAGES" /tmp/pacman.log
- follow_progress " Installing... Please Wait " /tmp/pacman.log
+ run_background pacman-installpkg "$PACMAN_TARGET -S $TARGET_PACKAGES" /home/arch/fifa/runtime/pacman.log
+ follow_progress " Installing... Please Wait " /home/arch/fifa/runtime/pacman.log
wait_for pacman-installpkg
@@ -33,13 +33,13 @@ installpkg() {
local _result=''
if [ ${pacman-installpkg_exitcode} -ne 0 ]; then
_result="Installation Failed (see errors below)"
- echo -e "\nPackage Installation FAILED." >>/tmp/pacman.log
+ echo -e "\nPackage Installation FAILED." >>/home/arch/fifa/runtime/pacman.log
else
_result="Installation Complete"
- echo -e "\nPackage Installation Complete." >>/tmp/pacman.log
+ echo -e "\nPackage Installation Complete." >>/home/arch/fifa/runtime/pacman.log
fi
- show_warning "$_result" "/tmp/pacman.log" text || return 1
+ show_warning "$_result" "/home/arch/fifa/runtime/pacman.log" text || return 1
target_special_fs off
sync