Print this page
1565 svccfg cleanup needs to suck it up and finish the job

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/svc/svccfg/svccfg_engine.c
          +++ new/usr/src/cmd/svc/svccfg/svccfg_engine.c
↓ open down ↓ 827 lines elided ↑ open up ↑
 828  828   * If the file exists check instance support, and cleanup any
 829  829   * stale instances.
 830  830   *
 831  831   * If the file doesn't exist tear down the service and/or instances
 832  832   * that are no longer supported by files.
 833  833   */
 834  834  int
 835  835  engine_cleanup(int flags)
 836  836  {
 837  837          boolean_t               activity = B_TRUE;
      838 +        int                     dont_exit;
 838  839          int                     r = -1;
 839  840  
 840  841          lscf_prep_hndl();
 841  842  
 842  843          if (flags == 1) {
 843  844                  activity = B_FALSE;
 844  845          }
 845  846  
      847 +        dont_exit = est->sc_cmd_flags & SC_CMD_DONT_EXIT;
      848 +        est->sc_cmd_flags |= SC_CMD_DONT_EXIT;
      849 +
 846  850          if (scf_walk_fmri(g_hndl, 0, NULL, SCF_WALK_SERVICE|SCF_WALK_NOINSTANCE,
 847  851              lscf_service_cleanup, (void *)activity, NULL,
 848  852              uu_warn) == SCF_SUCCESS)
 849  853                  r = 0;
      854 +
      855 +        if (dont_exit == 0)
      856 +                est->sc_cmd_flags &= ~SC_CMD_DONT_EXIT;
 850  857  
 851  858          (void) lscf_hash_cleanup();
 852  859  
 853  860          return (r);
 854  861  }
 855  862  
 856  863  static int
 857  864  apply_profile(manifest_info_t *info, int apply_changes)
 858  865  {
 859  866          bundle_t *b = internal_bundle_new();
↓ open down ↓ 236 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX