# msaflash install script

# create 256 sg device entries if they don't already exist

maxsg=256
string=/dev/sg

echo -e "\nMSA Flash Installer version 1.0 (September 29, 2003)\n"

echo -e "\nCreating Additional SG Devices!\n"

for (( i = 0 ; i<maxsg; i++ ))
do
	if [ -c $string$i ]
	then
		echo -e "$string$i does exist\n"
	else
		echo -e "$string$i does not exist\n"
		echo -e "Creating $string$i\n"
		mknod $string$i c 21 $i
		chgrp disk $string$i
		chmod 660 $string$i
	fi
done

cp -v ./lib/* /usr/lib
cp -v msaflash /usr/bin
