#!/bin/sh

PATH="/usr/bin:/usr/sbin:${PATH}"
export PATH

if [ -f $ROOTDIR/kernel/drv/hid ]; then
	rem_drv -b $ROOTDIR hid
	add_drv -b ${ROOTDIR} -m '* 0666 root sys' \
		-i '"usbif,class3.1"' -n hid || exit 1
fi

	not_installed() {
	driver=$1
	grep "^${driver} " $ROOTDIR/etc/name_to_major > /dev/null 2>&1
	return $?
	}
# Check to verify the installation env,EG diskless client or standalone install.
# Then install old framework client drivers if the env is not for a diskless client
# user service area.
if [ -f ${ROOTDIR}/etc/name_to_major ]; then
	not_installed usbprn || \
	add_drv -b ${ROOTDIR}  -m '* 0666 root sys' \
	-i '"usbif,class7.1.1" "usbif,class7.1.2"' -n usbprn || \
	exit 1 
fi	

exit 0
