#!/bin/sh
 
FWDIR=$BASEDIR

fw1_firewall=`cat $FWDIR/conf/product.conf | awk -F= '/FireWall/ {print $2}'`
if [ X$fw1_firewall = X0 ]; then
#if FireWall-1 module not installed, remove the kernel module if necessary
	egrep -s fw /etc/name_to_major
	if [ $? -eq 0 ]; then
	        echo Removing kernel...
	        /usr/sbin/rem_drv fw
	        sync
	        /bin/rm -f  /usr/kernel/drv/fw /usr/kernel/drv/fw.conf /dev/fw0 2>&1 > /dev/null
	fi
	 
	egrep -s 'name=fw' /etc/devlink.tab
	if [ $? -eq 0 ]; then
	        /usr/bin/ed /etc/devlink.tab << EOEX 2> /dev/null
g/name=fw/d
w
q
EOEX
	        /usr/sbin/devlinks
	fi
fi
