#! /bin/sh

ALLTOKENS="FJSV,GPUS FJSV,GPUSC-M FJSV,GPUSK"

for TOKENS in $ALLTOKENS
do
	test -L /usr/platform/$TOKENS/sbin > /dev/null 2>&1
	if [ $? != 0 ]
	then
		if [ -d /usr/platform/$TOKENS/sbin ]
		then
			rmdir /usr/platform/$TOKENS/sbin > /dev/null 2>&1
			if [ $? != 0 ]
			then
				echo ""
				echo "***Warning***"
				echo "Directory /usr/platform/$TOKENS/sbin is not empty."
				echo "Cannot restore the /usr/platform/$TOKENS/sbin link."
				echo "Please reinstall the \"FJSVcpc[x]\" packages."
				echo "Refer to the proper documentation on how to install"
				echo "packages in Solaris 9."
			else
				ln -s /usr/platform/sun4us/sbin /usr/platform/$TOKENS/sbin > /dev/null 2>&1
			fi
		else
			echo ""
			echo "**Warning***"
			echo "The /usr/platform/$TOKENS/sbin directory is missing on your system."
		fi
	fi
done

exit 0
