On Sun, 2002-06-23 at 15:20, Joost wrote: > Hello, > > I want to use another MAC-address for eth0 so that I can use another > nick for the connection with my ISP (the DHCP-server uses the MAC for > authorization). I accomplished this with the following command: > > ifconfig eth0 hw ether .......... > > I'd like to know where to put this in order to have it executed at > system start before the lease is acquired. My OS is Redhat 7.3.
The cleanest way that I see to do this wouldbe to set the ONBOOT variable in /etc/sysconfig/network-scripts/icfg-eth0 to no and then run your ifconfig and ifup eth0 from /etc/rc.d/rc.local rc.local gets run after everything else so you might end up with timing issues if you have any services started that depend on the interface to be up. at least this puts user/admin stuff where I normaly think to look for it. Another alternative is to place something in /sbin/ifup-pre-local that would check to see if the interface underconsideration is eth0 and if so do your ifconfig statment. This actually is more elegant IMHO but again I am loath to put local stuff in /sbin/ Both of these methods should survive an upgrade I belive. FWIW here is the code in /sbin/ifup that would call the ifup-pre-local: if [ -x /sbin/ifup-pre-local ]; then /sbin/ifup-pre-local ${DEVICE} fi so a simple test like : if [ $1="eth0" ] ;then logger "setting hw MAC address for $1" ifconfig ..... fi should get you going. HTH Bret _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list