Archive forPerl

Network Restart

This script is used to make onboard nic eth0 and addon gig card eth1

If allowed to boot w/o this; it boots PCI slots before onboard…

#!/usr/bin/perl

$KERNEL=`uname -r`;
chop($KERNEL);

system(”/etc/rc.d/init.d/network stop”);
system(”/sbin/rmmod e1000″);
system(”/sbin/rmmod tg3″);

$file1=”/lib/modules/$KERNEL/kernel/drivers/net/tg3.ko”;
$file2=”/lib/modules/$KERNEL/kernel/drivers/net/e1000/e1000.ko”;
system(”/sbin/insmod $file1″);
system(”/sbin/insmod $file2″);
system(”/etc/rc.d/init.d/network start”);

Comments off