Architecture dans le cas d'un serveur sous Ubuntu.
authorProgfou <jean-christophe.andre@auf.org>
Thu, 28 Apr 2011 07:01:38 +0000 (14:01 +0700)
committerProgfou <jean-christophe.andre@auf.org>
Thu, 28 Apr 2011 07:01:38 +0000 (14:01 +0700)
sysadmin/sysadmin-check-version-arch

index 6f32578..5ee5e76 100755 (executable)
@@ -19,8 +19,13 @@ fi
 
 EXPECTED_UBUNTU_VERSION="10.04"
 ACCEPTED_UBUNTU_VERSION="10.04"
-EXPECTED_UBUNTU_ARCH="i686"
-ACCEPTED_UBUNTU_ARCH="i686"
+if dpkg -l ubuntu-desktop >/dev/null 2>&1 ; then
+  EXPECTED_UBUNTU_ARCH="i686"
+  ACCEPTED_UBUNTU_ARCH="i686"
+else # serveur sous Ubuntu
+  EXPECTED_UBUNTU_ARCH="${EXPECTED_DEBIAN_ARCH}"
+  ACCEPTED_UBUNTU_ARCH="${ACCEPTED_DEBIAN_ARCH}"
+fi
 
 colorize() {
   color="$1" ; shift ; data="$@"