15760N/A#!/bin/sh
15760N/A#
15760N/A# CDDL HEADER START
15760N/A#
15760N/A# The contents of this file are subject to the terms of the
15760N/A# Common Development and Distribution License, Version 1.0 only
15760N/A# (the "License"). You may not use this file except in compliance
15760N/A# with the License.
15760N/A#
15760N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15760N/A# or http://www.opensolaris.org/os/licensing.
15760N/A# See the License for the specific language governing permissions
15760N/A# and limitations under the License.
15760N/A#
15760N/A# When distributing Covered Code, include this CDDL HEADER in each
15760N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15760N/A# If applicable, add the following below this CDDL HEADER, with the
15760N/A# fields enclosed by brackets "[]" replaced with your own identifying
15760N/A# information: Portions Copyright [yyyy] [name of copyright owner]
15760N/A#
15760N/A# CDDL HEADER END
15760N/A#
15760N/A#
15760N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
15760N/A# Use is subject to license terms.
15760N/A#
15760N/A
15760N/A
15760N/AHAS_XSCRNSVR=0
15767N/AX11_BIN=/usr/X11/bin
15760N/ADESKTOP_SESSION=${DESKTOP_SESSION:-"xdm"}
15760N/AMAIL=${MAIL-"/var/mail/$USER"}
15760N/ASHELL=${SHELL-"/bin/sh"}
15760N/ADISPLAY=${DISPLAY-":0"}
15760N/ATERM=${TERM-"xterm"}
15760N/A
16194N/A_ () {
16194N/A backup_TEXTDOMAIN=$TEXTDOMAIN
16194N/A backup_TEXTDOMAINDIR=$TEXTDOMAINDIR
16194N/A TEXTDOMAIN=gnome-session-2.0
16194N/A TEXTDOMAINDIR=/usr/share/locale
16194N/A export TEXTDOMAIN
16194N/A export TEXTDOMAINDIR
16194N/A
16194N/A if [ -x /usr/bin/gettext ] ; then
16194N/A gettext "$@"
16194N/A else
16194N/A printf "%s\n" "$@"
16194N/A fi
16194N/A
16194N/A TEXTDOMAIN=$backup_TEXTDOMAIN
16194N/A TEXTDOMAINDIR=$backup_TEXTDOMAINDIR
16194N/A export TEXTDOMAIN
16194N/A export TEXTDOMAINDIR
16194N/A}
16194N/A
16194N/Apostrun_progress_update ()
16194N/A{
16194N/A while [ 1 ] ; do
16194N/A I=1
16194N/A while [ $I -lt 99 ] ; do
16194N/A echo "$I"
16194N/A if [ `expr $I % 10` -eq 0 ] ; then
16194N/A /usr/lib/postrun-query -c JDS_wait -e;
16194N/A if [ $? -ne 0 ] ; then
16194N/A echo "100"
16194N/A fi
16194N/A fi
16194N/A I=`expr $I + 1`
16194N/A sleep 1
16194N/A done
16194N/A done
16194N/A}
16194N/A
16194N/A
15760N/Acase $DESKTOP_SESSION in
15832N/Agnome|GNOME|JDS|tgnome|TGNOME|tjds|TJDS|TrustedJDS)
15760N/A EDITOR=${EDITOR:-"gedit"}
15760N/A ;;
15760N/Akde|KDE)
15760N/A EDITOR=${EDITOR:-"kedit"}
15760N/A ;;
15760N/A*)
15760N/A EDITOR=${EDITOR:-"vi"}
15760N/A ;;
15760N/Aesac
15760N/A
15760N/Afor XPATH in `/bin/echo $PATH | /bin/tr ":" " "`
15760N/Ado
15760N/A if [ -x $XPATH/xscreensaver-demo ] ; then
15760N/A HAS_XSCRNSVR=1
15760N/A fi
15760N/Adone
15760N/A
15767N/Aif [ $HAS_XSCRNSVR -eq 0 -a -x $X11_BIN/xscreensaver-demo ] ; then
15767N/A PATH=${PATH}:$X11_BIN
15760N/Afi
15760N/A
15760N/Aexport PATH EDITOR MAIL TERM SHELL DISPLAY
15760N/A
15760N/Aif xmodmap | /usr/bin/grep mod4 | /usr/bin/grep Alt > /dev/null 2>/dev/null
15760N/Athen
15760N/A xmodmap -e "clear Mod1" \
15760N/A -e "clear Mod4" \
15760N/A -e "add Mod1 = Alt_L" \
15760N/A -e "add Mod1 = Alt_R" \
15760N/A -e "add Mod4 = Meta_L" \
15760N/A -e "add Mod4 = Meta_R"
15760N/Afi
15760N/A
16194N/Aif [ -x /usr/lib/postrun-query ] ; then
16194N/A /usr/lib/postrun-query -c JDS_wait -e
16194N/A if [ $? -eq 0 ] ; then
16194N/A TEXT=`_ "Completing post install setup..."`
16194N/A postrun_progress_update |\
16194N/A zenity --progress --text "$TEXT" --percentage 0 --auto-close
16194N/A if [ $? -ne 0 ] ; then
16194N/A echo "Cancel the session"
16194N/A kill -9 $$
16194N/A fi
16194N/A fi
16194N/Afi