Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5F001ECD2 for ; Mon, 25 Feb 2013 07:04:22 +0000 (UTC) Received: (qmail 211 invoked by uid 500); 25 Feb 2013 07:04:22 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 169 invoked by uid 500); 25 Feb 2013 07:04:22 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 148 invoked by uid 99); 25 Feb 2013 07:04:21 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2013 07:04:21 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 455E182F7A9; Mon, 25 Feb 2013 07:04:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bhaisaab@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: refs/heads/master - Have cloud-setup-* tools detect Debian Message-Id: <20130225070421.455E182F7A9@tyr.zones.apache.org> Date: Mon, 25 Feb 2013 07:04:21 +0000 (UTC) Updated Branches: refs/heads/master a4398af35 -> fe9df2186 Have cloud-setup-* tools detect Debian To minimize this change, treat Debian as Ubuntu for now. Reviewed-by: Wido (https://reviews.apache.org/r/9310) Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/fe9df218 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/fe9df218 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/fe9df218 Branch: refs/heads/master Commit: fe9df2186ba3ee1aa787208f4f9c05d9549a3baf Parents: a4398af Author: Noa Resare Authored: Sat Jan 12 20:34:32 2013 +0000 Committer: Rohit Yadav Committed: Mon Feb 25 12:32:25 2013 +0530 ---------------------------------------------------------------------- debian/control | 2 +- python/lib/cloudutils/utilities.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/fe9df218/debian/control ---------------------------------------------------------------------- diff --git a/debian/control b/debian/control index 380b2e4..e9697ea 100644 --- a/debian/control +++ b/debian/control @@ -48,7 +48,7 @@ Description: CloudStack server library Package: cloud-scripts Replaces: cloud-agent-scripts Architecture: any -Depends: openjdk-6-jre, python, bash, bzip2, gzip, unzip, nfs-common, openssh-client +Depends: openjdk-6-jre, python, bash, bzip2, gzip, unzip, nfs-common, openssh-client, lsb-release Description: CloudStack scripts This package contains a number of scripts needed for the CloudStack Agent and Management Server. Both the CloudStack Agent and Management server depend on this package http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/fe9df218/python/lib/cloudutils/utilities.py ---------------------------------------------------------------------- diff --git a/python/lib/cloudutils/utilities.py b/python/lib/cloudutils/utilities.py index c9d1e33..739a483 100755 --- a/python/lib/cloudutils/utilities.py +++ b/python/lib/cloudutils/utilities.py @@ -122,7 +122,14 @@ class Distribution: if kernel.find("2.6.32") != -1: self.release = "10.04" self.arch = bash("uname -m").getStdout() - + elif os.path.exists("/usr/bin/lsb_release"): + o = bash("/usr/bin/lsb_release -i") + distributor = o.getStdout().split(":\t")[1] + if "Debian" in distributor: + # This obviously needs a rewrite at some point + self.distro = "Ubuntu" + else: + raise UnknownSystemException(distributor) else: raise UnknownSystemException