Otus
Otus

Reputation: 345

Systemd service dependent on Generated init.d service

The system I'm on uses systemd, but the network bringup is still on old init.d scripts. I've added an systemd service to run on system boot, but I want to make sure it is run before the network setup occurs. Where can I specify this behaviour and how?

Upvotes: 1

Views: 597

Answers (1)

Umut
Umut

Reputation: 2473

You need to find the name of your legacy init.d script which sets up the network. Systemd has a service for it. Then you need to add Before= directive to your service. Ex, if there is something like /etc/rc5.d/network systemd will have a service network.service. Then just add Before=network.service.

Upvotes: 1

Related Questions