#! /bin/sh

# quit early and quietly if this is not going to work
test -x "/sbin/kmodule" || exit 0
# TODO - find out whether there is a "wrong module" problem
#        in CentOS5 - this script may be a workaround for a
#        problem which we don't ever see any more

# unload any network drivers which have been installed
# by rc.sysinit, so that we can allocate eth0/eth1 as we
# choose, rather than in order defined by kmodule
kmodule | while read devtype mod
do
   if [ "$devtype" = "NETWORK" ]
   then
        /sbin/rmmod $mod 2>/dev/null
   fi
done
