Automatic network availibility

Hi there,

today I have successfully setup a QNX-6.2.1 within a qemu environment. This was some kind of very hard because of the correct network settings. Actually I start qemu with:

/opt/qemu/bin/qemu … -net nic,vlan=0,model=ne2k_pci,macaddr=52:54:00:12:34:57 -net tap,vlan=0,ifname=tap0

Then QNX boots and I can login. After that I need to open a terminal and type in the following commands:

ifconfig -l

lo0

slay io-net

pci-bios

io-net -d ne2000 -p tcpip

ifconfig -l

lo0 en0

Then I can start from the menu ‘Configure → Network’ and start the device en0 as DHCP.

Is there any way I can do this automatically at boot time? I have something read about a build file and mkifs or similar, but either the file nor the command exist in my QNX version… And I want to set a static IP.

Any help would be very nice.
Thanks,
karellen

Karellen,

In the /etc directory there is a file called net.cfg. This is where you can assign your static IP address.

In the directory /etc/rc.d there is a script file called rc.sysinit. This does system initialization. As part of that initialization it calls another script called rc.local. Inside rc.local is where you would put all the commands you are currently manually typing.

Note: rc.local may not exist in the /etc/rc.d directory. If it doesn’t just create it. Also make sure to add the execute bit (chmod a+x rc.local) to this file if you manually create it.

Tim

Hi Tim,

seems to work :slight_smile: Thanks a lot.

Actually I am in a dhcp network, but I will look at the net.cfg file at home. But the hint with the rc.* scripts was just right. Just like my Slackware’s at home. Makes a lot much easier for me (like adding something like a rc.network and rc.sshd script or similar instead of putting everything into rc.local).

karellen