network.service is not a native service, then what is the CORRECT command?

Issues related to applications and software problems and general support
Post Reply
Windows
Posts: 59
Joined: 2021/06/16 13:20:01

network.service is not a native service, then what is the CORRECT command?

Post by Windows » 2021/06/16 14:11:46

Hello,

when I run

Code: Select all

systemctl enable network.service
I get warning:

Code: Select all

[root@pepsi ~]# systemctl enable network.service
network.service is not a native service, redirecting to systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable network
[root@pepsi ~]#
then what is the correct in CentOS 8 ?


Thanks

tunk
Posts: 1204
Joined: 2017/02/22 15:08:17

Re: network.service is not a native service, then what is the CORRECT command?

Post by tunk » 2021/06/16 14:28:28

I think NetworkManager is default in C8. I don't
use it, but I would guess it's started by default.
You can disable it and install network-scripts:
https://www.thegeekdiary.com/how-to-dis ... os-rhel-8/

PryMar56
Posts: 17
Joined: 2020/04/20 14:56:31

Re: network.service is not a native service, then what is the CORRECT command?

Post by PryMar56 » 2021/06/21 01:25:06

hello,
in C7 you needed initscripts package, now in C8 you install network-scripts, then:
chkconfig network on

cheers,
Prymar56

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: network.service is not a native service, then what is the CORRECT command?

Post by jlehtone » 2021/06/21 07:26:54

Windows wrote:
2021/06/16 14:11:46
what is the correct in CentOS 8 ?

Code: Select all

systemctl enable network.service
The systemd-sysv-install script is called by "systemctl enable/disable" when the given unit is a SysV init.d script. It needs to call the distribution's mechanism for enabling/disabling those, such as chkconfig, update-rc.d, or similar.
RHEL 6 had SysV and all services had init.d-scripts. RHEL 7 and 8 have systemd and most services have systemd unit files.

However, no systemd unit files have been created for all services, because those services are already deprecated and there is no point to put effort in them. They still have init.d-script. Systemd has some legacy support so that those services can still be used.

The "warning" is just a notification that network.service is a such case.

Post Reply