#! /bin/sh #---------------------------------------------------------------------------- # /etc/rc.d/eth - configuration of your ethernet card # # Creation: 15.10.2001 fm # Last Update: 20.07.2003 fm # # Copyright (c) 2001-2003 Frank Meyer # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- script='eth:' . /etc/config.d/base if [ "$ETH_DO_DEBUG" = yes ] then set -x fi case $1 in start) /usr/local/bin/colecho "loading ethernet drivers ..." gn idx=1 insmod 8390 2>/dev/null insmod pci-scan 2>/dev/null while [ "$idx" -le "$ETH_DRV_N" ] do eval drv='$ETH_DRV_'$idx eval opt='$ETH_DRV_'$idx'_OPTION' case $drv in *_cs) echo "$drv should be loaded by pcmcia cardmgr in a few seconds ..." ;; *) insmod $drv $opt if [ $? != 0 ] then echo $script" modul $drv $opt failed!" >>/bootmsg.txt fi ;; esac idx=`/usr/bin/expr $idx + 1` done ;; stop) /usr/local/bin/colecho "unloading ethernet drivers ..." gn idx=1 while [ "$idx" -le "$ETH_DRV_N" ] do eval drv='$ETH_DRV_'$idx case $drv in *_cs) ;; *) rmmod $drv ;; esac idx=`/usr/bin/expr $idx + 1` done rmmod pci-scan 2>/dev/null rmmod 8390 2>/dev/null ;; esac set +x