head	1.1;
access;
symbols;
locks; strict;
comment	@# @;


1.1
date	2005.03.10.11.25.44;	author tcheun1;	state Exp;
branches;
next	;


desc
@@


1.1
log
@/etc/init.d/hwsetup
@
text
@#!/bin/bash
#
# hwsetup		This scripts runs the kudzu hardware probe.
#
# chkconfig: 345 05 95
# description: 	This runs the hardware probe, and optionally configures \
#		changed hardware.

# This is an interactive program, we need the current locale

#[ -f /etc/profile.d/lang.sh ] && . /etc/profile.d/lang.sh
#[ -z "${CONSOLETYPE:-}" ] && CONSOLETYPE="`/sbin/consoletype`"

#if [ "$CONSOLETYPE" != "pty" ]; then
#	case "${LANG:-}" in
#		ja_JP*|ko_KR*|zh_CN*|zh_TW*)
#			export LANG=en_US
#			;;
#		*)
#			export LANG
#			;;
#	esac
#fi
export LANG=en_US

if [ "$CONSOLETYPE" = "serial" ]; then
	export TERM=vt100
fi

# Source function library.
. /etc/init.d/functions

RETVAL=$?

case "$1" in
 start)
	echo -n $"Hardware Setting"

 	/opt/booyo/hwsetup-booyo
	RETVAL=$?
	if [ "$RETVAL" -eq 0 ]; then
  	   action "" /bin/true
	else
	   action "" /bin/false
	   echo -n $"Hardware setting is failed."
	   echo -n $"Run '/usr/sbin/kudzu' from the command line to re-detect."
	fi

	# However, if they did configure X and want runlevel 5, let's
	# switch to it...
	if [ -f /opt/booyo/mkxf86config ]; then
		/opt/booyo/mkxf86config
        else
           action "" /bin/false
           echo -n $"Can't find /opt/booyo/mkxf86config."
           echo -n $"Run '/usr/sbin/kudzu' from the command line to re-detect."
	fi
	touch /var/lock/subsys/hwsetup-booyo
	;;
 status)
 	base=hwsetup-booyo
 	if [ -f /var/lock/subsys/hwsetup-booyo ]; then
	  echo $"${base} has run"
	  exit 0
	fi
	echo $"${base} is stopped"
	exit 3
	;;
 stop)
 	rm -f /var/lock/subsys/hwsetup-booyo
 	;;
 *)
 	echo $"Usage: $0 {start|stop}"
	exit 1
	;;
esac

exit $RETVAL
@
