Browse code

more usability feedback

Anthony Young authored on 2011/11/10 04:10:26
Showing 1 changed files
... ...
@@ -44,6 +44,14 @@ EOF
44 44
 # Set ownership to jenkins
45 45
 chown -R jenkins $CUR_DIR
46 46
 
47
+# Make sure this directory is accessible to jenkins
48
+if ! su -c "ls $CUR_DIR" jenkins; then
49
+    echo "Your devstack directory is not accessible by jenkins."
50
+    echo "There is a decent chance you are trying to run this from a directory in /root."
51
+    echo "If so, try moving devstack elsewhere (eg. /opt/devstack)."
52
+    exit 1
53
+fi
54
+
47 55
 # Set up jobs symlink
48 56
 if [ ! -h /var/lib/jenkins/jobs ]; then
49 57
     echo "Installing jobs symlink"