public static void main(String[] args) throws Exception {

    Injector injector = Guice.createInjector(new ControllerModule(), new MpackCheckerAuditModule(), new LdapModule());
    MpackInstallChecker mpackInstallChecker = injector.getInstance(MpackInstallChecker.class);
    MpackContext mpackContext = processArguments(args);

    mpackInstallChecker.startPersistenceService();

    mpackInstallChecker.checkClusters(mpackContext.getStacksInMpack());

    mpackInstallChecker.stopPersistenceService();

    if(mpackInstallChecker.isErrorsFound()) {
      LOG.error("Mpack installation checker failed!");
      System.err.println("Mpack installation checker failed!");
      System.exit(1);
    } else {
      LOG.info("No errors found");
      System.out.println("No errors found");
    }
  }
Main method for management pack installation checker
ambari-server/src/main/java/org/apache/ambari/server/checks/MpackInstallChecker.java