io-net startup

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 <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

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?

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?

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.