[systemd-devel] Recommendation for "systemd.module" unit

Lennart Poettering lennart at poettering.net
Mon Jan 28 16:26:50 PST 2013


On Fri, 25.01.13 17:13, Mantas Mikulėnas (grawity at gmail.com) wrote:

> 
> On Fri, Jan 25, 2013 at 2:18 AM, Larry Baker <baker at usgs.gov> wrote:
> > Lennart,
> >
> > There's more to it than that.  The DECnet kernel module must first be loaded
> > so that it creates /proc/net/decnet*.  When the dnetd service is started, it
> > parses /etc/decnet.conf and writes the DECnet host address to
> > /proc/sys/net/decnet/node_address and the default DECnet device (interface)
> > to /proc/sys/net/decnet/default_device.  The MAC address of all the DECnet
> > interfaces has to be changed to a special multicast address.  This all
> > usually must be done before IP networking is started.  I am not sure that a
> > socket can be opened before networking is up.
> 
> It can. All the program needs to do is call `socket(PF_DECNET, ...)`.
> Whether networking is "up" or not (for all definitions of "up") does
> not matter until you try to connect() or bind() or do similar things.

I tend to agree with this. I meean, the DECNET client code should
probably have a nice check to verify that DECNET is available at all
anyway, and this really looks like the best way to do it. Just try to
create the socket, this will load all modules if necessary, and thus
make sure all special dirs in /sys and /proc are there. And if it fails,
then you know that support is not available and there isn't a loadable
module for it either.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list