run a command on startup
freebsd at dfwlp.com
Sat Jan 27 01:46:04 UTC 2007
On Friday 26 January 2007 16:45, Kevin Downey wrote:
> On 1/26/07, Jonathan Horne <freebsd at dfwlp.com> wrote:
> > i have a box that my nic's eeprom got zapped last night. WOL is a must
> > for me, and as a last ditch, i finally have the card talking again if i
> > set a mac address manually. upon shutdown, apparently it remember the
> > address i set, and answers to a WOL packet. also, it appears to
> > immediately forget the mac that was set when the computer starts, because
> > when i get back to the login, the ifconfig shows the mac to be
> > 00:00:00:00:00:00 again, and i have to 'ifconfig fxp0 ether [mad
> > address]' after each boot.
> > where can i stick that command so its run during boot up, maybe
> > preferable before the network configuration is loaded?
> > strangely enough, even when the mac address is 00's, i can still ping
> > around my lan (i didnt think this was possible without a mac address)
> > thanks,
> > jonathan
> you can put "ether [mac address]" in fxp0's ifconfig line in /etc/rc.conf
> ifconfig_fxp0="ether [mac address]"
well, unfortunately, that didnt work.
# -- sysinstall generated deltas -- # Mon Jan 22 15:32:44 2007
# Created: Mon Jan 22 15:32:44 2007
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
ifconfig_fxp0="inet 192.168.125.71 netmask 255.255.255.128"
pollux# ifconfig fxp0
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 192.168.125.71 netmask 0xffffff80 broadcast 192.168.125.127
media: Ethernet autoselect (100baseTX <full-duplex>)
is there another way to skin this cat?
More information about the freebsd-questions