Add the nostop keyword so that we don't stop the network init script by default.
This commit is contained in:
		@@ -13,6 +13,8 @@ depend()
 | 
			
		||||
	need localmount
 | 
			
		||||
	after bootmisc
 | 
			
		||||
	provide net
 | 
			
		||||
	# We don't want to stop network unless we really have to
 | 
			
		||||
	keyword nostop
 | 
			
		||||
	keyword nojail noprefix novserver
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
.\" Copyright 2007-2008 Roy Marples
 | 
			
		||||
.\" Copyright 2007-2009 Roy Marples
 | 
			
		||||
.\" All rights reserved
 | 
			
		||||
.\"
 | 
			
		||||
.\" Redistribution and use in source and binary forms, with or without
 | 
			
		||||
@@ -22,7 +22,7 @@
 | 
			
		||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 | 
			
		||||
.\" SUCH DAMAGE.
 | 
			
		||||
.\"
 | 
			
		||||
.Dd September 19, 2008
 | 
			
		||||
.Dd April 26, 2009
 | 
			
		||||
.Dt RUNSCRIPT 8 SMM
 | 
			
		||||
.Os OpenRC
 | 
			
		||||
.Sh NAME
 | 
			
		||||
@@ -139,6 +139,9 @@ When in a jail, exclude this service from any dependencies. The service can
 | 
			
		||||
still be run directly.
 | 
			
		||||
.It Dv noopenvz
 | 
			
		||||
Same as nojail, but for OpenVZ systems.
 | 
			
		||||
.It Dv nostop
 | 
			
		||||
Don't stop this service when changing runlevels, even if not present.
 | 
			
		||||
This includes shutting the system down.
 | 
			
		||||
.It Dv notimeout
 | 
			
		||||
Do not time out waiting for that service.
 | 
			
		||||
.It Dv nouml
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										12
									
								
								src/rc/rc.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								src/rc/rc.c
									
									
									
									
									
								
							@@ -577,10 +577,10 @@ do_stop_services(const char *newlevel, bool parallel)
 | 
			
		||||
{
 | 
			
		||||
	pid_t pid;
 | 
			
		||||
	RC_STRING *service, *svc1, *svc2;
 | 
			
		||||
	RC_STRINGLIST *deporder, *tmplist;
 | 
			
		||||
	RC_STRINGLIST *deporder, *tmplist, *kwords;
 | 
			
		||||
	RC_SERVICE state;
 | 
			
		||||
	RC_STRINGLIST *nostop;
 | 
			
		||||
	bool crashed;
 | 
			
		||||
	bool crashed, nstop;
 | 
			
		||||
 | 
			
		||||
	if (!types_n) {
 | 
			
		||||
		types_n = rc_stringlist_new();
 | 
			
		||||
@@ -601,6 +601,14 @@ do_stop_services(const char *newlevel, bool parallel)
 | 
			
		||||
			rc_service_mark(service->value, RC_SERVICE_FAILED);
 | 
			
		||||
			continue;
 | 
			
		||||
		}
 | 
			
		||||
		kwords = rc_deptree_depend(deptree, service->value, "keyword");
 | 
			
		||||
		if (rc_stringlist_find(kwords, "nostop"))
 | 
			
		||||
			nstop = true;
 | 
			
		||||
		else
 | 
			
		||||
			nstop = false;
 | 
			
		||||
		rc_stringlist_free(kwords);
 | 
			
		||||
		if (nstop)
 | 
			
		||||
			continue;
 | 
			
		||||
 | 
			
		||||
		/* If the service has crashed, skip futher checks and just stop
 | 
			
		||||
		   it */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user