Systemd Missing Something?

Home » CentOS » Systemd Missing Something?
CentOS 3 Comments

“Note that traditional init scripts continue to function on a systemd system. An init script /etc/rc.d/init.d/foobar is implicitly mapped into a service unit foobar.service during system initialization.”

That’s what it says in /etc/init.d/README.

However, what it implies doesn’t seem to work out.

In the same directory as that README is a file called “network” which is symlinked into the various /etc/rc.d/rc?.d/ directories, i.e.:

# ls -l $(find /etc/rc.d/ -name S*network)
lrwxrwxrwx. 1 root root 17 Jan 26 15:23 /etc/rc.d/rc2.d/S56network ->
../init.d/network lrwxrwxrwx. 1 root root 17 Jan 26 15:23 /etc/rc.d/rc3.d/S56network ->
../init.d/network lrwxrwxrwx. 1 root root 17 Jan 26 15:23 /etc/rc.d/rc4.d/S56network ->
../init.d/network lrwxrwxrwx. 1 root root 17 Jan 26 15:22 /etc/rc.d/rc5.d/S56network ->
../init.d/network

But “network” isn’t executed on boot. However, it does work when I run this:

# /etc/init.d/network restart

So is this a bug, or is there something else that needs to be done?

3 thoughts on - Systemd Missing Something?

  • Am 07.05.2017 um 16:22 schrieb ken:

    CentOS 7 uses by default NetworkManager, thus the network service is disabled because both conflict.

    Alexander

  • It does not imply what you infer, because it explicitly says that the file in init.d is mapped to a systemd service unit. The files in rc.d are not used, because systemd does not boot to runlevel 2, 3, 4, or 5.

    If you want “network” to start on boot, you would use “systemctl enable network”. (You would also want to “systemctl disable NetworkManager”)

  • The two do not conflict and there is no need to to disable one to use the other.

    In fact you shoudl leave network enabled when using NetworkManager or you will get some odd behaviours, like missing loopback.

    If you do ‘nmcli d’ to list devices you’ll see that loopback is unmanaged, ie it’s handled by the network service.