#! /bin/csh -f

#
# if FWDIR is not /etc/fw, maybe we should have a link there
#
source scripts/aliases

	set fwlink = 0
	if (!($?fwlink)) goto ok
	if ($FWDIR == /etc/fw) goto ok
	if ( (-e /etc/fw) && (-e $FWDIR) ) then
		set ef_i = ( `/bin/ls -iLd /etc/fw` )
		set FWD_i = ( `/bin/ls -iLd $FWDIR` )
		if ( $ef_i[1] == $FWD_i[1] ) goto ok
	endif

	E ""
	E "Linking /etc/fw to $FWDIR"
	E "------------------------------"
	E "It is recommended that you have a link from /etc/fw to $FWDIR."
	exists /etc/fw
	if ($status == 0) then
		E "Old /etc/fw Will be moved to /etc/fw.$now."
	endif
	E ""
	E -n 'Please confirm (y/n) [y]: '
	get yn
	fwrand
	E ""
	if ("X$yn" == "X" || "X$yn" == "Xy") then
		set fwlink=1
		if ($#argv == 1) then
			echo "Fwlink=$fwlink" >> $1
		endif
	endif
ok:
	exit 0
