The best that I can tell is that this code traces back to David Schmitt. It has been forked many times since then :)
you cannot add databases to an instance that has a root password
you have to specify username as BLAH at USER or it cannot be found
mysql_grant does not complain if user does not exist
Needs support for pre-seeding on debian
the types may need to take user/password
rather or not to configure /etc/.my.cnf should be configurable