From ca5af8615e58b78dbb0242074bc35aec5de1dda5 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Fri, 4 Oct 2013 13:33:07 -0500 Subject: [PATCH] Remove general assumption in get_packages() get_packages() always included 'general' as a default 'service' file. Remove this assumption and add it explicitly to the primary package installation call. This allows get_package() to be used in other places where 'general' is not desired to be included. Change-Id: I1eed4386d073d6ae9534aedae32654208c6662e8 --- functions | 4 ++-- tools/install_prereqs.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/functions b/functions index d9445fe6e7..6aee24008c 100644 --- a/functions +++ b/functions @@ -248,7 +248,7 @@ function _get_package_dir() { # - ``# dist:DISTRO`` or ``dist:DISTRO1,DISTRO2`` limits the selection # of the package to the distros listed. The distro names are case insensitive. function get_packages() { - local services=$1 + local services=$@ local package_dir=$(_get_package_dir) local file_to_parse local service @@ -260,7 +260,7 @@ function get_packages() { if [[ -z "$DISTRO" ]]; then GetDistro fi - for service in general ${services//,/ }; do + for service in ${services//,/ }; do # Allow individual services to specify dependencies if [[ -e ${package_dir}/${service} ]]; then file_to_parse="${file_to_parse} $service" diff --git a/tools/install_prereqs.sh b/tools/install_prereqs.sh index 68f11ce35e..0c65fd9b00 100755 --- a/tools/install_prereqs.sh +++ b/tools/install_prereqs.sh @@ -55,7 +55,7 @@ export_proxy_variables # ================ # Install package requirements -install_package $(get_packages $ENABLED_SERVICES) +install_package $(get_packages general $ENABLED_SERVICES) if [[ -n "$SYSLOG" && "$SYSLOG" != "False" ]]; then if is_ubuntu || is_fedora; then