From 4ca059f9d9ff32b8ad5ce4eaa59229c8367f458e Mon Sep 17 00:00:00 2001 From: Ryan Brady Date: Thu, 26 Jun 2014 16:44:11 -0400 Subject: [PATCH] Use $DISTRO_NAME instead of local lsb_release The $DISTRO_NAME var is now set in all of the OS elements in environment.d. This patch removes the call to lsb_release and instead uses the $DISTRO_NAME variable. Change-Id: I7088eb88b6a3611fef5a21a6b62975876549465f --- elements/base/pre-install.d/03-baseline-tools | 7 ++----- elements/ramdisk/install.d/20-install-dhcp-client | 4 +--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/elements/base/pre-install.d/03-baseline-tools b/elements/base/pre-install.d/03-baseline-tools index e7eac4b06..e111f5bf1 100755 --- a/elements/base/pre-install.d/03-baseline-tools +++ b/elements/base/pre-install.d/03-baseline-tools @@ -4,11 +4,8 @@ set -eu set -o pipefail -# If lsb_release is missing, just do nothing. -DISTRO=`lsb_release -si` || true - -case $DISTRO in - 'Ubuntu'|'Debian') +case $DISTRO_NAME in + 'ubuntu'|'debian') # Note: add-apt-repository would be nice for RPM platforms too - so when we # need something like it, create a wrapper in dpkg/bin and fedora/bin. apt-get -y update diff --git a/elements/ramdisk/install.d/20-install-dhcp-client b/elements/ramdisk/install.d/20-install-dhcp-client index 5b52bc1ae..98fc31d62 100755 --- a/elements/ramdisk/install.d/20-install-dhcp-client +++ b/elements/ramdisk/install.d/20-install-dhcp-client @@ -2,8 +2,6 @@ set -eux set -o pipefail -DISTRO=`lsb_release -si` || true - -if [ "openSUSE project" = "$DISTRO" ]; then +if [ "opensuse" = "$DISTRO_NAME" ]; then install-packages dhcp-client fi