#! /bin/bash
################################################################################
# Copyright (c) 2001 Compaq Computer Corporation, all rights reserved.
################################################################################
#
#  Module:	$RCSfile: cpqpwrmgr,v $
#
#  Version:	$Revision: 1.2 $
#
#  Author:	$Author: jlong $
#
#  Date:	$Date: 2001/03/08 17:26:17 $
#
################################################################################

if [ ! -x /usr/lib/tcl8* ]
then
	echo "ERROR: tcl8.x is not installed."
	echo "Tcl MUST be installed to use the Compaq Power Down Manager"
	exit 1
fi

if [ -x /usr/bin/wish ]
then
	TCLWISH=/usr/bin/wish
elif [ -x /usr/bin/wish8.3 ]
then
	TCLWISH=/usr/bin/wish8.3
elif [ -x /usr/bin/wish8.0 ]
then
	TCLWISH=/usr/bin/wish8.0
elif [ -x /usr/bin/wishx ]
then
	TCLWISH=/usr/bin/wishx
elif [ -x /usr/bin/tixwish ]
then
	TCLWISH=/usr/bin/tixwish
elif [ -x /usr/bin/tixwish4.1.8.0 ]
then
	TCLWISH=/usr/bin/tixwish4.1.8.0
elif [ -e /usr/bin/tixwish4.1.8.3 ]
then
	TCLWISH=/usr/bin/tixwish4.1.8.3
else
	echo "ERROR: cpqpwrmgr: /usr/bin/wish not found!"
	echo "X-Windows must be installed to run the Compaq Power Down Manager."
	exit 1
fi

$TCLWISH /sbin/cpqpwrmgr.tcl
	
exit 0
