systemd and network service

Patrick MONNERAT pm at datasphere.ch
Mon Oct 4 11:49:14 UTC 2010


On Thu, 2010-09-30 at 14:37 +0200, Michal Schmidt wrote: 
> On Thu, 30 Sep 2010 14:04:00 +0200 Patrick MONNERAT wrote:
> > Until now (with upstart), my rawhide system started the network
> > service but not the NetworkManager service.
> > With systemd, neither of these are started by default.
> 
> You may be seeing https://bugzilla.redhat.com/show_bug.cgi?id=630225 or
> a similar bug.

Many thanks for the link. However, I did not understand it enough to
find something usable.

> > I've read some previous discussions about creating missing links,
> > defaults, etc. There is a listed solution based on NetworkManager, but
> > it is not applicable on the network service, because the file
> > "/lib/systemd/system/network.service" does not exist and thus cannot
> > be linked to from a *.wants directory.
> 
> That's correct. There's no native systemd unit file for the network
> service. "network.service" in systemd is generated by processing the
> classic SysV initscript /etc/init.d/network.

I finally resolved my problem in a dirty way (I do not know all systemd
arcanes): Create the file /lib/sysemd/system/start-network.service with
the following contents (perhaps not very well tuned, but it works for
me):

--------------------
[Unit]
Description=Network
After=network.target

[Service]
Type=forking
ExecStart=/etc/init.d/network start 

[Install]
WantedBy=multi-user.target
-------------------

Then issue command "systemctl enable start-network.service". The network
will be properly brought up at next reboot.

In hope it can temporary help people with the same problem.

Regards,
Patrick
-------------- next part --------------
[Unit]
Description=Network
After=network.target

[Service]
Type=forking
ExecStart=/etc/init.d/network start 

[Install]
WantedBy=multi-user.target


More information about the devel mailing list