In pkg-install script for freenas-ui, bail if there are errors.

In install_ports() function, bail if the freenas initial database
has note been generated.  The database is usually not created
if there are errors in the python migration code.

Ticket: #5450
Ticket: #5447