#! /bin/csh -f

	echo "Recover system files"
	if ($solaris2) then
		/bin/rm -f /etc/rc[23].d/S[0-9][0-9]firewall1 >& /dev/null
		/bin/rm -f /etc/init.d/firewall1 >& /dev/null
		if ((-e /etc/fw.boot/S69inet) && (!(-z etc/fw.boot/S69inet))) then
			/bin/cp /etc/fw.boot/S69inet /etc/rc2.d/S69inet
		endif
		if ((-e /etc/fw.boot/S30rootusr.sh) && \
			(!(-z etc/fw.boot/S30rootusr.sh))) then
			/bin/cp /etc/fw.boot/S30rootusr.sh /etc/rcS.d/S30rootusr.sh
			if ($status == 0) then
				/bin/rm -rf /etc/fw.boot
			endif
		endif
		/bin/rm -f /etc/rcS.d/S31firewall1 >& /dev/null
		exit 0
	endif

	if ($hpux == 9) then
		if ((-e /etc/fw.boot/brc) && (!(-z /etc/fw.boot/brc))) then
			/bin/cp /etc/fw.boot/brc /etc/brc
			if ($status == 0) then
				/bin/rm -rf /etc/fw.boot >& /dev/null
			endif
		endif
	endif

	if ($hpux == 10) then
	  /bin/rm -f /sbin/init.d/fw1bootsec /sbin/rc2.d/S002firwall1 >& /dev/null
	  /bin/rm -f /sbin/init.d/noipforward >& /dev/null
	endif

	if ($sunos4) then
		if ((-e /etc/fw.boot/rc.single) && (!(-z /etc/fw.boot/rc.single))) then
			/bin/cp /etc/fw.boot/rc.single /etc/rc.single
		endif
		if ((-e /etc/fw.boot/rc.boot) && (!(-z /etc/fw.boot/rc.boot))) then
			/bin/cp /etc/fw.boot/rc.boot /etc/rc.boot
			if ($status == 0) then
				/bin/rm -rf /etc/fw.boot >& /dev/null
			endif
		endif
	endif

