#!/bin/ksh -p
#
# ident "@(#)utgdmconfigpath.ksh	1.4	11/01/26 Oracle"
#
# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
#
PATH=/usr/bin:/bin:/usr/sbin:/sbin
export PATH

UTWHICH=/opt/SUNWut/lib/utwhich

gdm_search_path=/etc/gdm:/etc/X11/gdm

if [ "`uname -s`" = "SunOS" ]; then
    gdm_path=`$UTWHICH -f $gdm_search_path custom.conf`
else
    gdm_path=`rpm -ql "gdm" | grep "custom.conf"`
fi

if [ $? -ne 0 ]; then
	echo "$(basename $0): Cannot determine GDM install directory" 1>&2
	exit 1;
fi

echo ${gdm_path%/custom.conf}/

exit 0
