mysql -u root -phda -e "select comment from shares" hda_production | grep -v "^comment$" | xargs -d "\n" mkdir -p
doesnt work - gives error "Unknown column 'comment' in 'field list'". Checking the actual columns it seems the right one is 'name'; I changed the script on my machine to
mysql -u root -phda -e "select name from shares" hda_production | grep -v "^comment$" | xargs -d "\n" mkdir -p
and reran the mount_shares_locally service - now works fine.