0

I use CentOS release 6.5 (Final) and I would like that wpa_supplicant service start after network service. When I go to /etc/rc5.d and I type ls command, I can see :

K84wpa_supplicant -> ../init.d/wpa_sup
S10network -> ../init.d/network
S23NetworkManager -> ../init.d/Network

The content of /etc/init.d/network is :

# chkconfig: 2345 10 90

The content of /etc/init.d/wpa_supplicant is :

# chkconfig: - 23 88

I changed the 90 to 88 and the 88 to 90 but when I restart my CentOS, the network service always start after wpa_supplicant. How can I solve it ?

0

In this init script the '10' refers to the start position, while the '90' refers to the kill position.

# chkconfig: 2345 10 90

By changing 90 to 88, and 88 to 90, you are only changing the positions of which processes stop first. In this case, your wpa_supplicant init script starts at position 23, while network starts at position 10, so these are the numbers that will need to be changed in order to manipulate the startup order of each script.

|improve this answer|||||
  • Ok thanks, so I understand that I need to compare only the S to view the order of services start. So in the current configuration, network starts at position 10 so before wpa_supplicant. Why I can't see wpa_spplicant service in /etc/rc5.d for exemple ? I only see the K84wpa_supplicant -> ../init.d/wpa_sup and not S23wpa_supplicant -> ../init.d/wpa_sup – user324143 Dec 5 '18 at 9:04
  • Essentially there are two ways to modify start/stop positions of init scripts. One is to adjust the numbers in the init script like we have discussed: – Bekah Tangney Dec 5 '18 at 15:14
  • Woops, pressed enter too soon. Let's try this again. – Bekah Tangney Dec 5 '18 at 15:21
  • Essentially there are two ways to modify start/stop positions of init scripts. One is to adjust the numbers within the actual init script like we have discussed: # chkconfig: - 23 88 The other is to mv/rename the scripts within each /etc/rc{0,6}.d directory with a K or S and number to reflect the location. But these are really just symlinks to the actual script in /etc/init.d. The wpa_supplicant init script, instead of specifying that it starts for runlevels 2, 3, 4, 5 the way your network script does, has a dash (-). I believe this is linked to the reason it's not in /etc/rc5.d. – Bekah Tangney Dec 5 '18 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy