--- /usr/lib/fai/get-config-dir-svn	2008-10-15 10:27:23.000000000 +0100
+++ get-config-dir-svn	2008-10-17 15:06:50.356328774 +0100
@@ -14,6 +14,13 @@
 username=$(expr match "$FAI_CONFIG_SRC" '[^:]*://\([^@]*\)@')
 svnpath=$(expr match "$FAI_CONFIG_SRC" '[^:]*://[^@]\+@\([^[:space:]]\+\)')
 
+#If username is blank, extract the svnpath correctly for this case
+if [ -z $username ]
+then
+  svnpath=$(expr match "$FAI_CONFIG_SRC" '[^:]*://\([^[:space:]]\+\)')
+fi
+
+
 case $protocol in
 	svn)
 		svnurl="svn://$svnpath"
@@ -30,6 +37,7 @@
 	svn+ssh)
 		svnurl="svn+ssh://$username@$svnpath"
 		# this is a bit hackish: if $username is empty, the path gets corrected below... 
+		[ -z "$username" ] && svnurl=$FAI_CONFIG_SRC
 		# explaination: svn co -username foo svn+ssh://bar doesnt work as svn co svn+ssh://foo@bar
 		;;
 	*)
@@ -39,7 +47,6 @@
 esac
 		
 [ -n "$username" ] && user="--username $username"
-[ -z "$username" ] && svnurl=$FAI_CONFIG_SRC
 
 if [ -d "$FAI/.svn" ] ; then
    echo "Updating SVN in $FAI"
