Refactored common logic for device provisioning to allow enterprise
version to reuse start/stop logic.