add functions to manipulate ENABLED_SERVICES
Editing ENABLED_SERVICES directly can get tricky when
the user wants to disable something. This patch includes
two new functions for adding or removing services
safely, and a third (for completeness) to clear the
settings entirely before adding a minimal set of
services.
It also moves the logic for dealing with "negated"
services into a function so it can be tested and
applied by the new functions for manipulating
ENABLED_SERVICES.
Change-Id: I88f205f3666b86e6f0b6a94e0ec32a26c4bc6873
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
diff --git a/openrc b/openrc
index be7850b..4430e82 100644
--- a/openrc
+++ b/openrc
@@ -20,6 +20,9 @@
# Find the other rc files
RC_DIR=$(cd $(dirname "$BASH_SOURCE") && pwd)
+# Import common functions
+source $RC_DIR/functions
+
# Load local configuration
source $RC_DIR/stackrc