io-net startup

bridged with qdn.public.qnxrtp.installation
Post Reply
Bill Caroselli

io-net startup

Post by Bill Caroselli » Mon Aug 18, 2003 3:54 pm

I have a netstart.myhost script that is called from my sysinit script.

It looks something like this:
io-net -ptcpip -pqnet -dspeedo
/usr/sbin/if-up -r20 -p en0
/usr/sbin/if-up -r20 -p en1
ifconfig en0 192.168.1.222
ifconfig en1 192.168.2.222
route add default 192.168.1.1

If this is called from sysinit and sysinit wit for it it works fine:
I.E.
if [ -x /etc/system/netstart.myhost ]; then
/etc/system/netstart.myhost
fi

However if I load this script in the background it fails to configure
the interfaces.
if [ -x /etc/system/netstart.myhost ]; then
/etc/system/netstart.myhost &
fi

It's as if io-net can not compete with other processes while
initializing. How can I make this work?

Bill Caroselli

Re: io-net startup

Post by Bill Caroselli » Mon Aug 18, 2003 3:57 pm

Bill Caroselli <qtps@earthlink.net> wrote:

BC > I have a netstart.myhost script that is called from my sysinit script.

BC > It looks something like this:
BC > io-net -ptcpip -pqnet -dspeedo
BC > /usr/sbin/if-up -r20 -p en0
BC > /usr/sbin/if-up -r20 -p en1
BC > ifconfig en0 192.168.1.222
BC > ifconfig en1 192.168.2.222
BC > route add default 192.168.1.1

BC > If this is called from sysinit and sysinit wit for it it works fine:
^^^
waits
BC > I.E.
BC > if [ -x /etc/system/netstart.myhost ]; then
BC > /etc/system/netstart.myhost
BC > fi

BC > However if I load this script in the background it fails to configure
BC > the interfaces.
BC > if [ -x /etc/system/netstart.myhost ]; then
BC > /etc/system/netstart.myhost &
BC > fi

BC > It's as if io-net can not compete with other processes while
BC > initializing. How can I make this work?

--
Bill Caroselli -- Q-TPS Consulting
1-(626) 824-7983
qtps@earthlink.net

Xiaodan Tang

Re: io-net startup

Post by Xiaodan Tang » Mon Aug 18, 2003 4:17 pm

Bill Caroselli <qtps@earthlink.net> wrote in message
news:bhqsrf$lp$1@inn.qnx.com...
I have a netstart.myhost script that is called from my sysinit script.

It looks something like this:
io-net -ptcpip -pqnet -dspeedo
/usr/sbin/if-up -r20 -p en0
/usr/sbin/if-up -r20 -p en1
/bin/on -w /dev/socket/ -W 20
ifconfig en0 192.168.1.222
ifconfig en1 192.168.2.222
route add default 192.168.1.1
You might also want full path for these 3 lines.

-xtang
If this is called from sysinit and sysinit wit for it it works fine:
I.E.
if [ -x /etc/system/netstart.myhost ]; then
/etc/system/netstart.myhost
fi

However if I load this script in the background it fails to configure
the interfaces.
if [ -x /etc/system/netstart.myhost ]; then
/etc/system/netstart.myhost &
fi

It's as if io-net can not compete with other processes while
initializing. How can I make this work?

Bill Caroselli

Re: io-net startup

Post by Bill Caroselli » Mon Aug 18, 2003 4:52 pm

Xiaodan Tang <xtang@qnx.com> wrote:

XT > Bill Caroselli <qtps@earthlink.net> wrote in message
XT > news:bhqsrf$lp$1@inn.qnx.com...
I have a netstart.myhost script that is called from my sysinit script.

It looks something like this:
io-net -ptcpip -pqnet -dspeedo
/usr/sbin/if-up -r20 -p en0
/usr/sbin/if-up -r20 -p en1
XT > /bin/on -w /dev/socket/ -W 20

This did not help.

Is there anything else I can look for?

Guest

Re: io-net startup

Post by Guest » Tue Aug 19, 2003 2:59 pm

Just a thought. What is happening after this
in your sysinit script? Maybe something there
is clobbering your netstart.myhost script.

I realize that "if_up" and "on -w" both should be
doing approximately the same thing, but you could
always try "waitfor" as well.

waitfor /dev/socket 10

Bill Caroselli <qtps@earthlink.net> wrote:
Xiaodan Tang <xtang@qnx.com> wrote:

XT > Bill Caroselli <qtps@earthlink.net> wrote in message
XT > news:bhqsrf$lp$1@inn.qnx.com...

I have a netstart.myhost script that is called from my sysinit script.

It looks something like this:
io-net -ptcpip -pqnet -dspeedo
/usr/sbin/if-up -r20 -p en0
/usr/sbin/if-up -r20 -p en1

XT > /bin/on -w /dev/socket/ -W 20

This did not help.

Is there anything else I can look for?
--
James MacMillan, QNX Software Systems, Ltd. http://www.qnx.com
Semper Vigilans

The opinions expressed are my own and do not represent those of QSSL.

Post Reply

Return to “qdn.public.qnxrtp.installation”