Newer versions of apache2 packages on Ubuntu (as of 12.10) do not ship
with mod_version.c as a separate shared object, but back again built into
the apache2 binary.

So, check before we link to a possibly non-existing file.

This is a fix for github issue #601.

Signed-off-by: Cleber Rosa <[email protected]>
---
 contrib/install-autotest-server.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/contrib/install-autotest-server.sh 
b/contrib/install-autotest-server.sh
index 77233d3..31ff8d8 100755
--- a/contrib/install-autotest-server.sh
+++ b/contrib/install-autotest-server.sh
@@ -441,7 +441,9 @@ if [ ! -e  /etc/apache2/sites-enabled/001-autotest ]
 then
     /usr/local/bin/substitute "WSGISocketPrefix run/wsgi" "#WSGISocketPrefix 
run/wsgi" $ATHOME/apache/conf/django-directives
     sudo rm /etc/apache2/sites-enabled/000-default
-    sudo ln -s /etc/apache2/mods-available/version.load 
/etc/apache2/mods-enabled/
+    if [ -f /etc/apache2/mods-available/version.load ]; then
+       sudo ln -s /etc/apache2/mods-available/version.load 
/etc/apache2/mods-enabled/
+    fi
     sudo ln -s $ATHOME/apache/conf /etc/apache2/autotest.d
     sudo ln -s $ATHOME/apache/apache-conf 
/etc/apache2/sites-enabled/001-autotest
     sudo ln -s $ATHOME/apache/apache-web-conf 
/etc/apache2/sites-enabled/002-autotest
-- 
1.7.11.7

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to