From 78a53d92c734e6921a555313a0163bd3ca7afa31 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Thu, 9 May 2013 17:20:31 -0700 Subject: [PATCH] Only search the lib dir for rpc_backend The grep in rpc_backend uses . to search all files. Unfortunately the current directory when the command is called is not the lib directory, so change it to search the lib directory instead. Without this fix the command is forced to grep all files under devstack which could be very slow if one has downloaded large images. Fixes bug 1174718 Change-Id: Ic8a59885cd07e5d6f2e734e80824762f9ac12996 --- lib/rpc_backend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rpc_backend b/lib/rpc_backend index 27d3ba3364..1fb1f21599 100644 --- a/lib/rpc_backend +++ b/lib/rpc_backend @@ -30,7 +30,7 @@ function check_rpc_backend() { # that can be passed as arguments to is_service_enabled. # We check for a call to iniset_rpc_backend in these files, meaning # the service needs a backend. - rpc_candidates=$(grep -rl iniset_rpc_backend . | awk -F/ '{print $NF}') + rpc_candidates=$(grep -rl iniset_rpc_backend $TOP_DIR/lib/ | awk -F/ '{print $NF}') for c in ${rpc_candidates}; do if is_service_enabled $c; then rpc_needed=0