Add is_ubuntu function
This replaces all of the [[ "$os_PACKAGE" = "deb" ]] tests, except when
those tests are before straight calls to dpkg.
Change-Id: I8a3ebf1b1bc5a55d736f9258d5ba1d24dabf04ea
diff --git a/lib/horizon b/lib/horizon
index 189ca10..d0a0f05 100644
--- a/lib/horizon
+++ b/lib/horizon
@@ -71,7 +71,7 @@
sudo mkdir -p $HORIZON_DIR/.blackhole
- if [[ "$os_PACKAGE" = "deb" ]]; then
+ if is_ubuntu; then
APACHE_NAME=apache2
APACHE_CONF=sites-available/horizon
# Clean up the old config name
@@ -110,7 +110,7 @@
# install_horizon() - Collect source and prepare
function install_horizon() {
# Apache installation, because we mark it NOPRIME
- if [[ "$os_PACKAGE" = "deb" ]]; then
+ if is_ubuntu; then
# Install apache2, which is NOPRIME'd
install_package apache2 libapache2-mod-wsgi
elif is_suse; then
@@ -121,7 +121,7 @@
fi
# NOTE(sdague) quantal changed the name of the node binary
- if [[ "$os_PACKAGE" = "deb" ]]; then
+ if is_ubuntu; then
if [[ ! -e "/usr/bin/node" ]]; then
install_package nodejs-legacy
fi