How to change order of services

Kevin J. Cummings cummings at kjchome.homeip.net
Thu Jul 10 21:19:20 UTC 2008


Andrea wrote:
> Hi,
> 
> I am trying to change the order of the service wpa_supplicant.
> I want it to run before "network".
> 
> So I have changed /etc/rc.d/init.d/wpa_supplicant
> 
> # chkconfig:   - 23 88
> 
> to
> 
> # chkconfig:   - 9 91
> 
> Bear in mind that network has the following
> # chkconfig: - 10 90
> 
> Then I deselect and reselect it in ntsysv.
> Everything works fine, and at reboot wpa_supplicant starts before network.
> 
> But whenever I update the system, wpa_supplicant goes back to the 
> original position (even if the file has not changed), after network.
> 
> What am I missing?

When you turned on wpa_supplicant with chkconfig, it creates symbolic 
links in the various rc.d directories which begin with either S or K 
(start or kill) and the numbers (priorities).  Just changing the file in 
/etc/init.d doesn't change these links.  You have to use chkconfig to 
turn them off or delete them, and then add them back again to get the 
new links.  *OR*  you could change the file by hand, and then change all 
of the links names to contain the new numbers by hand.  One is easier 
than the other.  You decide which.

> Andrea
> 


-- 
Kevin J. Cummings
kjchome at rcn.com
cummings at kjchome.homeip.net
cummings at kjc386.framingham.ma.us
Registered Linux User #1232 (http://counter.li.org)




More information about the users mailing list