=== modified file 'etc/maas/templates/commissioning-user-data/snippets/maas_enlist.sh' --- etc/maas/templates/commissioning-user-data/snippets/maas_enlist.sh 2015-01-30 11:47:16 +0000 +++ etc/maas/templates/commissioning-user-data/snippets/maas_enlist.sh 2015-02-26 07:47:31 +0000 @@ -199,10 +199,10 @@ serverurl="maas.local" servername="$serverurl" fi -if echo "$serverurl" | egrep -q '(^[a-z]+://|^)[a-z0-9\.]+($|/$)'; then +if echo "$serverurl" | egrep -q '(^[a-z]+://|^)[a-z0-9\.\-]+($|/$)'; then api_url="MAAS/api/1.0/nodes/" else - api_url=`echo $serverurl | sed 's#^\(\|[a-z]\+://\)[a-zA-Z0-9\.]\+\(\|\:[0-9]\+\)/##'` + api_url=`echo $serverurl | sed 's#^\(\|[a-z]\+://\)[a-zA-Z0-9\.\-]\+\(\|\:[0-9]\+\)/##'` fi #TODO: Auto-detect hostname?