package: consolidate get_packages logic

Refactor get_package logic.
With this refactoring, code like
"if is_ubuntu; then install_package xxx elif is_fedora..."
can be simplified later.

Change-Id: I489bfd4cc12cc6b0b8201837f2bfb78c6881c82c
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
diff --git a/tools/install_prereqs.sh b/tools/install_prereqs.sh
index 4d151db..7c4386f 100755
--- a/tools/install_prereqs.sh
+++ b/tools/install_prereqs.sh
@@ -54,15 +54,7 @@
 # ================
 
 # Install package requirements
-if is_ubuntu; then
-    install_package $(get_packages $FILES/apts)
-elif is_fedora; then
-    install_package $(get_packages $FILES/rpms)
-elif is_suse; then
-    install_package $(get_packages $FILES/rpms-suse)
-else
-    exit_distro_not_supported "list of packages"
-fi
+install_package $(get_packages $ENABLED_SERVICES)
 
 if [[ -n "$SYSLOG" && "$SYSLOG" != "False" ]]; then
     if is_ubuntu || is_fedora; then