#!/sbin/sh
#
# Copyright (c) 1998-1999 by Sun Microsystems, Inc.
# All rights reserved.
#
#ident	"%Z%%M%	%I%	%E% SMI"

#
# This file should be copied to /etc/llc2/llc2_start so that LLC2 is
# automatically started in boot time.
#

PATH=/usr/bin
LLC2DIR=/etc/llc2
LLC2CONFDIR=$LLC2DIR/default
LLC2LIBDIR=/usr/lib/llc2

# Create the default configuration directory if it does not exist. 
if [ ! -d $LLC2CONFDIR ] ; then
	mkdir $LLC2CONFDIR
fi

#
# If there is no existing configuration file or autoconfig is set,
# generate new configuration files.
#
if [ ! -s $LLC2CONFDIR/llc2.* -o -f $LLC2DIR/.autoconfig ] ; then
	$LLC2LIBDIR/llc2_autoconfig
fi

# Do the LLC2 plumbing
if [ -x $LLC2LIBDIR/llc2_config ] ; then
	$LLC2LIBDIR/llc2_config -P
fi
