#!/bin/sh
#
# Copyright (C) 1993 Sun Microsystems International
#
#
# Postinstall script for SUNWcsr package, 101085-01 patch
#

if [ "${BASEDIR}" != "/" ]; then
	minor_perm=$BASEDIR/etc/minor_perm
	name_to_major=$BASEDIR/etc/name_to_major
else
	minor_perm=/etc/minor_perm
	name_to_major=/etc/name_to_major
fi

#
# Check for the existance of the llc2 driver, or another llc1 driver.
#

if grep llc2 ${name_to_major} >/dev/null 2>&1; then
	exit 0
fi

if grep llc1 ${name_to_major} >/dev/null 2>&1; then
	exit 0
fi

#
# There is no other driver installed, so lets install our llc1 driver.
#

if grep "llc1" $minor_perm >/dev/null 2>&1 ; then
	:
else
	echo "clone:llc1 0666 root sys" >> $minor_perm
fi

if grep "llc1" $name_to_major >/dev/null 2>&1 ; then
	:
else
	echo "Configuring llc1 driver..."
	/usr/sbin/add_drv "llc1"
fi

exit 0

