]> git.saurik.com Git - apt.git/commitdiff
show the error message if the webserver start failed
authorDavid Kalnischkies <david@kalnischkies.de>
Thu, 16 Jan 2014 16:21:13 +0000 (17:21 +0100)
committerDavid Kalnischkies <david@kalnischkies.de>
Thu, 16 Jan 2014 16:21:13 +0000 (17:21 +0100)
Can happen e.g. if port 8080 is already used by something else

Git-Dch: Ignore

test/integration/framework

index 60a8167fab28e62821a944c053ce8d90160947e4..c4953812bdc9f502a83ce4ea732e814e3b748770 100644 (file)
@@ -835,10 +835,14 @@ changetowebserver() {
        else
                shift
        fi
-       local LOG='/dev/null'
        if test -x ${APTWEBSERVERBINDIR}/aptwebserver; then
                cd aptarchive
-               aptwebserver -o aptwebserver::fork=1 "$@" >$LOG 2>&1
+               local LOG="$(mktemp)"
+               addtrap "rm $LOG;"
+               if ! aptwebserver -o aptwebserver::fork=1 "$@" >$LOG 2>&1 ; then
+                       cat $LOG
+                       false
+               fi
                local PID="$(cat aptwebserver.pid)"
                if [ -z "$PID" ]; then
                        msgdie 'Could not fork aptwebserver successfully'