Ticket #100 (closed defect: fixed)
Opened 2 years ago
Last modified 23 months ago
Net services are not properly shutdown on runlevel change.
Reported by: | Skotlex <skotlex@mailforce.net> | Owned by: | roy |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | rc | Version: | |
Keywords: | Cc: |
Description (last modified by roy) (diff)
As specified in the linked forum entry, when doing a "rc <run level>" change, if both current and target runlevels have different net.* services, the runlevel change will fail to bring down an interface, but it will bring up the second interface while simply assuming the previous one is down (without it being so).
Easiest would be to illustrate with an example.
Runlevel default has net.web included, but not net.wireless
Runlevel wireless has net.wireless included, but not net.web
When switching from default->wireless, the result is that both net.web and net.wireless are up, rc-status will not show net.web, but /etc/init.d/net.web status will display it as running. Running "rc" or "rc wireless" again will correctly bring down the web interface (the problem also happens when changing from wireless->default).
Both services are not allowed to be coldplugged, by the way:
rc_plug_services="!net.web !net.wireless"
This was tested on OpenRC 0.2.5 and the GIT version of 22/07/2008.
I think I have this fixed now.
Basically, the error was we were testing services in the current runlevel that need us, not the runlevel we are changing to.
http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commitdiff;h=40a5bb15c69d4d24e7cdcddcb1d4fa77005d9949