Improvements to ethernet detection
Richard ('rerwin' in the Puppy Forum) posted that his ethernet is not working at first bootup:
http://murga-linux.com/puppy/viewtopic.php?p=1054811#1054811
This is a difficult situation, as I cannot reproduce it, nor do other
users of Easy have this problem, not that I know of anyway. So, I have
nothing much to go on, however, attempting to improve the code.
I have done some work on these:
/usr/local/pup_event/pup_event_frontend_d
/usr/local/pup_event/frontend_timeout60
/usr/local/pup_event/netchg
/usr/sbin/delayedrun
The first one is a C program, pup_event_frontend_d.c, in the
'pup_tools' PET. It is a daemon, that is started when X starts. One of
the things it does is detect ethernet carrier up and down, which
corresponds to the modem turning on or off, or the ethernet cable being
unplugged or plugged. It will also detect a USB wifi dongle being
unplugged or plugged.
When it detects one of these events, one of the responses is to call the 'netchg' script.
There was a possibility that an event could be missed in pup_event_frontend_d, so I have worked on the code to fix that.
In the forum it was suggested that running
"/etc/init.d/rc.networkmanager restart" after bootup will cause
NetworkManager to reassess the ethernet and obtain an IP address from
the modem dhcp server. So I have put this into the 'netchg' script.
For debugging purposes, text printed from 'netchg' will appear in
/tmp/xerrs.log, so it can be seen if it is getting called and what it is
doing.
I have also modified this script:
/etc/rc.d/rc.network_eth_nm
Previously, it brought up the ethernet interfaces. However, now it
does nothing, just exits. Back in the early days when I started using
NetworkManager, it seemed that I had to explicitly bring these
interfaces up. However, NetworkManager is supposed to do that
automatically, so now allowing it to, and working so far for me.
These changes will of course be in the next release, and we will see if
Richard's problem is resolved, or getting closer to being
resolved.
Tags: easy