dtstart revision 11311
11311N/A#!/bin/ksh
11311N/A#
11311N/A# Script for starting a desktop session
11311N/A#
11311N/A# CDDL HEADER START
11311N/A#
11311N/A# The contents of this file are subject to the terms of the
11311N/A# Common Development and Distribution License, Version 1.0 only
11311N/A# (the "License"). You may not use this file except in compliance
11311N/A# with the License.
11311N/A#
11311N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11311N/A# or http://www.opensolaris.org/os/licensing.
11311N/A# See the License for the specific language governing permissions
11311N/A# and limitations under the License.
11311N/A#
11311N/A# When distributing Covered Code, include this CDDL HEADER in each
11311N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11311N/A# If applicable, add the following below this CDDL HEADER, with the
11311N/A# fields enclosed by brackets "[]" replaced with your own identifying
11311N/A# information: Portions Copyright [yyyy] [name of copyright owner]
11311N/A#
11311N/A# CDDL HEADER END
11311N/A#
11311N/A#
11311N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
11311N/A# Use is subject to license terms.
11311N/A#
11311N/A
11311N/ADT_SYS_CONFIG_DIR=/usr/dt/config
11311N/ADT_SITE_CONFIG_DIR=/etc/dt/config
11311N/AMYNAME=$(basename $0)
11311N/A
11311N/Ausage() {
11311N/A echo "Usage: $0 session_name"
11311N/A echo " session_name is the suffix of an Xinitrc script in"
11311N/A echo " $DT_SITE_CONFIG_DIR (local configuration location) or"
11311N/A echo " $DT_SYS_CONFIG_DIR (system default location)."
11311N/A}
11311N/A
11311N/Aif [ $# -ne 1 ]; then
11311N/A usage
11311N/A exit 1
11311N/Afi
11311N/A
11311N/Acase "$1" in
11311N/A -h|--help|-\?)
11311N/A usage
11311N/A exit 0
11311N/A ;;
11311N/Aesac
11311N/A
11311N/ASESSION_NAME="$1"
11311N/A
11311N/Aif [ -x "${DT_SITE_CONFIG_DIR}/Xinitrc.${SESSION_NAME}" ]; then
11311N/A XINITRC="${DT_SITE_CONFIG_DIR}/Xinitrc.${SESSION_NAME}"
11311N/Aelif [ -x "${DT_SYS_CONFIG_DIR}/Xinitrc.${SESSION_NAME}" ]; then
11311N/A XINITRC="${DT_SYS_CONFIG_DIR}/Xinitrc.${SESSION_NAME}"
11311N/Aelse
11311N/A echo "$MYNAME: Xinitrc.${SESSION_NAME} not found in ${DT_SITE_CONFIG_DIR} or ${DT_SYS_CONFIG_DIR}" 1>&2
11311N/A exit 1
11311N/Afi
11311N/A
11311N/Aexec $XINITRC