From b4104957b198b38aba609ed3889e7fa605012d19 Mon Sep 17 00:00:00 2001
From: Roy Marples <roy@marples.name>
Date: Wed, 1 Jul 2009 00:07:32 +0100
Subject: We should use -feature instead of nofeature. This matches the
 ifconfig and Gentoo USE flag syntax and is hopefully easier to read. Fixes
 #178.

---
 src/rc/rc.c        | 7 +++++--
 src/rc/runscript.c | 3 ++-
 2 files changed, 7 insertions(+), 3 deletions(-)

(limited to 'src/rc')

diff --git a/src/rc/rc.c b/src/rc/rc.c
index 3d8628e8..6d04b3dd 100644
--- a/src/rc/rc.c
+++ b/src/rc/rc.c
@@ -600,8 +600,11 @@ do_stop_services(const char *newlevel, bool parallel, bool going_down)
 			continue;
 		}
 		kwords = rc_deptree_depend(deptree, service->value, "keyword");
-		if (rc_stringlist_find(kwords, "nostop") ||
-		    (going_down && rc_stringlist_find(kwords, "noshutdown")))
+		if (rc_stringlist_find(kwords, "-stop") ||
+		    rc_stringlist_find(kwords, "nostop") ||
+		    (going_down &&
+			(rc_stringlist_find(kwords, "-shutdown") ||
+			    rc_stringlist_find(kwords, "noshutdown"))))
 			nstop = true;
 		else
 			nstop = false;
diff --git a/src/rc/runscript.c b/src/rc/runscript.c
index 91a31a59..ca0d3252 100644
--- a/src/rc/runscript.c
+++ b/src/rc/runscript.c
@@ -471,7 +471,8 @@ svc_wait(const char *svc)
 
 	/* Some services don't have a timeout, like fsck */
 	keywords = rc_deptree_depend(deptree, svc, "keyword");
-	if (rc_stringlist_find(keywords, "notimeout"))
+	if (rc_stringlist_find(keywords, "-timeout") ||
+	    rc_stringlist_find(keywords, "notimeout"))
 		forever = true;
 	rc_stringlist_free(keywords);
 
-- 
cgit v1.2.3