Print this page
4337 eliminate /etc/TIMEZONE

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/tsol/misc/txzonemgr.sh
          +++ new/usr/src/cmd/tsol/misc/txzonemgr.sh
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13  #
  14   14  # When distributing Covered Code, include this CDDL HEADER in each
  15   15  # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16   16  # If applicable, add the following below this CDDL HEADER, with the
  17   17  # fields enclosed by brackets "[]" replaced with your own identifying
  18   18  # information: Portions Copyright [yyyy] [name of copyright owner]
  19   19  #
  20   20  # CDDL HEADER END
  21   21  #
  22   22  # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
       23 +# Copyright 2014 Garrett D'Amore
  23   24  #
  24   25  #
  25   26  
  26   27  # This script provides a simple GUI for managing labeled zones.
  27   28  # It provides contextual menus which provide appropriate choices.
  28   29  # It must be run in the global zone as root.
  29   30  
  30   31  # These arguments are accepted, and will result in non-interactive
  31   32  # (text-only) mode:
  32   33  #
↓ open down ↓ 404 lines elided ↑ open up ↑
 437  438                  cp /etc/nsswitch.conf $ZONE_ETC_DIR/nsswitch.ldap
 438  439          else
 439  440                  print "name_service=NONE" > ${SYSIDCFG}
 440  441                  fi
 441  442          print "security_policy=NONE" >> ${SYSIDCFG}
 442  443          locale=$(locale|grep LANG | cut -d "=" -f2)
 443  444          if [[ -z $locale ]] ; then
 444  445                  locale="C"
 445  446          fi
 446  447          print "system_locale=$locale" >> ${SYSIDCFG}
 447      -        timezone=$(grep "^TZ" /etc/TIMEZONE|cut -d "=" -f2)
      448 +        timezone=$(grep "^TZ" /etc/default/init|cut -d "=" -f2)
 448  449          print "timezone=$timezone" >> ${SYSIDCFG}
 449  450          print "terminal=vt100" >> ${SYSIDCFG}
 450  451          rootpwd=$(grep "^root:" /etc/shadow|cut -d : -f2)
 451  452   
 452  453  #       There are two problems with setting the root password:
 453  454  #               The zone's shadow file may be read-only
 454  455  #               The password contains unparsable characters
 455  456  #       so the following line is commented out until this is resolved.
 456  457  
 457  458          #print "root_password=$rootpwd" >> ${SYSIDCFG}
↓ open down ↓ 1433 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX