#!/bin/sh
#	@(#)rtvc-config.sh	1.9 94/01/07 
#
# Copyright (c) 1991 by Sun Microsystems, Inc.
#
# /etc/rc2.d/S92rtvc-config - Configure for SunVideo

PATH=/usr/bin:/bin:/usr/sbin

devpath=/devices

#
# Now kickoff each card
#
for inst in `/bin/find $devpath -name '*rtvc*' -print`
do
   # Fix the permissions on the device links.
   # Due to problems with /etc/minor_perm (or maybe I just never figured
   #   it out), this is needed.
   # Note that on Solaris 2.3 and later, we use /etc/logindevperm.
   #      That doesn't mean we don't still need this, because we
   #      are still sitting around with bad permissions until someone
   #      logs into console.

    case $inst in

        */*rtvc[0-9] | */*rtvc[0-9][0-9]) 
            # Sometimes the 2nd and subsequent instances don't get the
            # right modes.  Fix it here.
            /bin/chmod 666 $inst
            ;;

        */*rtvcctl[0-9] | */*rtvcctl[0-9][0-9])
            # ensure modes are right on control device.
            # Necessary until we figure out how to get /etc/minor_perm to
            #  work.
            /bin/chmod 644 $inst
            ;;
    esac
done

exit 0
