Print this page
6805730 some simple changes would make 'init 5' much faster
6809492 startd shouldn't let hung subprocesses impede shutdown

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/cmd-inet/etc/init.d/pppd
          +++ new/usr/src/cmd/cmd-inet/etc/init.d/pppd
   1    1  #!/sbin/sh
   2    2  #
   3    3  # CDDL HEADER START
   4    4  #
   5    5  # The contents of this file are subject to the terms of the
   6      -# Common Development and Distribution License, Version 1.0 only
   7      -# (the "License").  You may not use this file except in compliance
   8      -# with the License.
        6 +# Common Development and Distribution License (the "License").
        7 +# You may not use this file except in compliance with the License.
   9    8  #
  10    9  # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  11   10  # or http://www.opensolaris.org/os/licensing.
  12   11  # See the License for the specific language governing permissions
  13   12  # and limitations under the License.
  14   13  #
  15   14  # When distributing Covered Code, include this CDDL HEADER in each
  16   15  # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  17   16  # If applicable, add the following below this CDDL HEADER, with the
  18   17  # fields enclosed by brackets "[]" replaced with your own identifying
  19   18  # information: Portions Copyright [yyyy] [name of copyright owner]
  20   19  #
  21   20  # CDDL HEADER END
  22   21  #
  23   22  #
  24      -# Copyright (c) 2000-2001 by Sun Microsystems, Inc.
  25      -# All rights reserved.
       23 +# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
       24 +# Use is subject to license terms.
  26   25  #
  27      -#ident  "%Z%%M% %I%     %E% SMI"
  28   26  
  29   27  PATH=/sbin:/usr/bin:/usr/sbin; export PATH
  30   28  PPPDIR=/etc/ppp; export PPPDIR
  31   29  
  32   30  case "$1" in
  33   31  'start')
  34   32          if [ ! -x /usr/bin/pppd -o ! -c /dev/sppp ]; then
  35   33                  echo "$0: Solaris PPP has not been correctly installed on"
  36   34                  echo "$0: this system.  Required files are missing."
  37   35                  exit 1
↓ open down ↓ 13 lines elided ↑ open up ↑
  51   49                                  /usr/sbin/sppptun plumb pppoed $intf
  52   50                          fi
  53   51                  done
  54   52          fi
  55   53          if [ -f $PPPDIR/pppoe ] && [ -x /usr/lib/inet/pppoed ]; then
  56   54                  /usr/lib/inet/pppoed >/dev/null
  57   55          fi
  58   56          ;;
  59   57  
  60   58  'stop')
  61      -        /usr/bin/pkill -x pppd
  62      -        sleep 1
  63      -        /usr/bin/pkill -x pppoed
       59 +        /usr/bin/pkill -z `/sbin/zonename` -x pppd && sleep 1
       60 +        /usr/bin/pkill -z `/sbin/zonename` -x pppoed
  64   61  
  65   62          # Use ifconfig to make the interfaces down just in case
  66   63          if [ -f $PPPDIR/ifconfig ]; then
  67   64                  nawk '/ifconfig[        ]*sppp/ { \
  68   65                          system("ifconfig " $2 " down"); \
  69   66                          system("ifconfig " $2 " unplumb"); \
  70   67                          next; \
  71   68                  } \
  72   69                  /ifconfig/ { \
  73   70                          $3 = "removeif"; \
↓ open down ↓ 23 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX