#!/bin/sh

###############################################################################
#
# Startup script for the I2C device driver.
#
# chkconfig: 123 1 80
#
# description: This driver provides access to the i2c hardware.
#
# Copyright (c) Intel Corporation 2000
#
###############################################################################

. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
  start)
	echo -n "Starting I2C drivers: "
	if command /sbin/insmod i2c-core ; then 
	    if command /sbin/insmod i2c-dev ; then 
	       echo_success 
	    else
	       /sbin/rmmod i2c-core
	       echo_failure
	    fi
	else
	    echo_failure
	fi
	echo
	;;
  stop)
	echo -n "Stopping I2C drivers: "
	/sbin/rmmod i2c-dev
	/sbin/rmmod i2c-core
	echo_success 
	echo
	;;
  *)
	echo "Usage: $0 {start|stop}"
	exit 1
esac

exit 0
