=== modified file 'etc/maas/templates/commissioning-user-data/snippets/maas_enlist.sh' --- etc/maas/templates/commissioning-user-data/snippets/maas_enlist.sh 2016-04-11 16:38:29 +0000 +++ etc/maas/templates/commissioning-user-data/snippets/maas_enlist.sh 2016-04-22 17:42:33 +0000 @@ -65,25 +65,23 @@ } get_host_architecture() { - if grep "flags" /proc/cpuinfo | grep -qs "\ lm\ "; then - # if /proc/cpuinfo Flags has 'lm', it is x86_64 - arch="amd64" - else - arch=`archdetect | cut -d'/' -f1` - fi - echo "$arch" + dpkg --print-architecture } get_host_subarchitecture() { local arch=$1 case $arch in - i386|amd64|arm64|ppc64el) - # Skip the call to archdetect as that's what - # get_host_architecture does - echo generic - ;; - *) - archdetect | cut -d'/' -f2 + i386|amd64|arm64|ppc64el) + ;; + *) + local rel="$(lsb_release -sc)" + case "$rel" in + precise|trusty|utopic|vivid) + archdetect | cut -d'/' -f2;; + *) + # wily+ do not have archdetect in system + :;; + esac ;; esac }