Fix a bug in helper's get_distro function
authorNikos Skalkotos <skalkoto@grnet.gr>
Tue, 11 Oct 2011 11:47:28 +0000 (14:47 +0300)
committerNikos Skalkotos <skalkoto@grnet.gr>
Tue, 11 Oct 2011 12:31:13 +0000 (15:31 +0300)
snf-image-helper/common.sh

index b1a6813..1724361 100644 (file)
@@ -71,7 +71,7 @@ get_distro() {
     if [ -e "$root_dir/etc/debian_version" ]; then
         distro="debian"
         if [ -e ${root_dir}/etc/lsb-release ]; then
-            ID=$(grep $DISTRIB_ID=${root_dir}/etc/lsb-release | cut -d= -f2)
+            ID=$(grep ^DISTRIB_ID= ${root_dir}/etc/lsb-release | cut -d= -f2)
             if [ "x$ID" = "xUbuntu" ]; then
                 distro="ubuntu"
             fi