Print this page
7928 Add support for SMF_EXIT_TEMP_TRANSIENT

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/vntsd/svc-vntsd
          +++ new/usr/src/cmd/vntsd/svc-vntsd
   1    1  #!/sbin/sh
   2    2  #
   3    3  # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
   4    4  # Use is subject to license terms.
   5    5  #
        6 +# Copyright 2017 RackTop Systems.
        7 +#
   6    8  # CDDL HEADER START
   7    9  #
   8   10  # The contents of this file are subject to the terms of the
   9   11  # Common Development and Distribution License (the "License").
  10   12  # You may not use this file except in compliance with the License.
  11   13  #
  12   14  # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  13   15  # or http://www.opensolaris.org/os/licensing.
  14   16  # See the License for the specific language governing permissions
  15   17  # and limitations under the License.
↓ open down ↓ 121 lines elided ↑ open up ↑
 137  139  # Since we may be installed on a machine with an older firmware we need to make
 138  140  # sure that we don't try to start if the virtual console concentrator is not
 139  141  # present.
 140  142  #
 141  143  VNTSD_DEV='/devices/virtual-devices@100/channel-devices@200/virtual-console-concentrator@0:ctl'
 142  144  if [ ! -c "$VNTSD_DEV" ]; then
 143  145          echo "The Virtual Network Terminal Server service has been disabled" \
 144  146              "because the system has no virtual console concentrator (vcc)" \
 145  147              "device."
 146  148          /usr/sbin/svcadm disable -t "$SMF_FMRI"
 147      -        sleep 5 &
 148      -        exit $SMF_EXIT_OK
      149 +        exit $SMF_EXIT_TEMP_TRANSIENT
 149  150  fi
 150  151  
 151  152  if [ -x /usr/lib/ldoms/vntsd ]; then
 152  153      /usr/lib/ldoms/vntsd $args
 153  154      rc=$?
 154  155      if [ $rc -ne 0 ]; then
 155  156          # if vntsd exited in error with status 1, let SMF restart it
 156  157          # otherwise we want it to go into maintenance.
 157  158          if [ $rc -eq 1 ]; then
 158  159              exit $SMF_ERR_OTHER
 159  160          else
 160  161              exit $SMF_ERR_FATAL
 161  162          fi
 162  163      fi
 163  164  else
 164  165      echo "WARNING: /usr/lib/ldoms/vntsd is missing or not executable" >& 2
 165  166      exit $SMF_EXIT_ERR_CONFIG
 166  167  fi
 167  168  
 168  169  exit $SMF_EXIT_OK
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX