Print this page
2594 implement graceful shutdown for local zones in zoneadm

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/zoneadmd/zoneadmd.h
          +++ new/usr/src/cmd/zoneadmd/zoneadmd.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
       24 + * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
  24   25   */
  25   26  
  26   27  #ifndef _ZONEADMD_H
  27   28  #define _ZONEADMD_H
  28   29  
  29   30  #ifdef  __cplusplus
  30   31  extern "C" {
  31   32  #endif
  32   33  
  33   34  #include <libdladm.h>
↓ open down ↓ 17 lines elided ↑ open up ↑
  51   52  
  52   53  #define DEVFSADM        "devfsadm"
  53   54  #define DEVFSADM_PATH   "/usr/sbin/devfsadm"
  54   55  
  55   56  #define EXEC_PREFIX     "exec "
  56   57  #define EXEC_LEN        (strlen(EXEC_PREFIX))
  57   58  
  58   59  #define CLUSTER_BRAND_NAME      "cluster"
  59   60  #define LABELED_BRAND_NAME      "labeled"
  60   61  
       62 +#define SHUTDOWN_WAIT           60
       63 +#define SHUTDOWN_DEFAULT        "/sbin/init 0"
       64 +#define SHUTDOWN_FMRI   "svc:/system/zones:default"
       65 +
  61   66  /* 0755 is the default directory mode. */
  62   67  #define DEFAULT_DIR_MODE \
  63   68          (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
  64   69  #define DEFAULT_DIR_USER -1     /* user ID for chown: -1 means don't change */
  65   70  #define DEFAULT_DIR_GROUP -1    /* grp ID for chown: -1 means don't change */
  66   71  
  67   72  
  68   73  typedef struct zlog {
  69   74          FILE *logfile;  /* file to log to */
  70   75  
↓ open down ↓ 97 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX