dhcp.client error and profile under Photon

I installed QNX NC and then upgraded to QNX SE. This behaviour has existed
since NC.

When photon comes up, the network is running using DHCP and it works fine.
If I open the network configuration dialog and change to manual and the back
to DHCP I get the following error.

“…Could not start dhcp.client: No such file or directory.”

I noticed that dhcp.client is in /usr/sbin, but a terminal window opened
from photon does not include this path in its environment variable PATH. The
profile file in /etc adds this path on login but it does not show on a
photon terminal window. I quit photon and went back to the login shell. I
noticed that profile was not sourced until I logged in on that shell. If I
then manually start photon (ph) the terminal windows include the /usr/sbin
directory and the DHCP works fine when I select it. Is profile not supposed
to run when photon is automatically started? What is the correct solution to
this problem?

Thanks!!

  • Ricardo

Ricardo wrote:

I installed QNX NC and then upgraded to QNX SE. This behaviour has existed
since NC.

When photon comes up, the network is running using DHCP and it works fine.
If I open the network configuration dialog and change to manual and the back
to DHCP I get the following error.

“…Could not start dhcp.client: No such file or directory.”

I noticed that dhcp.client is in /usr/sbin, but a terminal window opened
from photon does not include this path in its environment variable PATH. The
profile file in /etc adds this path on login but it does not show on a
photon terminal window. I quit photon and went back to the login shell. I
noticed that profile was not sourced until I logged in on that shell. If I
then manually start photon (ph) the terminal windows include the /usr/sbin
directory and the DHCP works fine when I select it. Is profile not supposed
to run when photon is automatically started? What is the correct solution to
this problem?

The problem is network config needs to be done as root, and you are
logged in as another user.

The first option would be to login as root. Then it should ‘just’ work.

If that is too inconvienent, you can do this(which is what I do):

$ su -

The - is important as you become root with the correct environment.
Unfortunately this means you lose the photon stuff in your path.
Fortunately you can then:

/usr/photon/bin/phlip &

At this point everything works as you expected.

Rick…


\

Rick Duff Internet: rick@astranetwork.com
Astra Network QUICS: rgduff
QNX Consulting and Custom Programming URL: http://www.astranetwork.com
+1 (204) 987-7475 Fax: +1 (204) 987-7479

Actually, I’m login in to photon as root. I don’t even have another account
setup yet. :astonished:)

  • Ricardo

Hi

Edit /etc/rc.d/rc.sysinit and add /usr/sbin to the PATH variable.

IIRC, /etc/profile is sourced by login shell, which is, ofcourse, not
started until you start a login window (eg. “pterm -l sh”).

photon is started in rc.sysinit, so it inherits the path given there.

HTH


Regards

I installed QNX NC and then upgraded to QNX SE. This behaviour has existed
since NC.

When photon comes up, the network is running using DHCP and it works fine.
If I open the network configuration dialog and change to manual and the
back
to DHCP I get the following error.

“…Could not start dhcp.client: No such file or directory.”

I noticed that dhcp.client is in /usr/sbin, but a terminal window opened
from photon does not include this path in its environment variable PATH.
The
profile file in /etc adds this path on login but it does not show on a
photon terminal window. I quit photon and went back to the login shell. I
noticed that profile was not sourced until I logged in on that shell. If I
then manually start photon (ph) the terminal windows include the /usr/sbin
directory and the DHCP works fine when I select it. Is profile not
supposed
to run when photon is automatically started? What is the correct solution
to
this problem?

Thanks!!

  • Ricardo