Resource ordering and lint fixes

Added ensure_package call, and explicit ordering to ensure it runs
before the init script is generated.

Added a default block to the switch.