]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
Bugfix in create-grml-squash.sh
authorFrank Brehm <frank.brehm@profitbricks.com>
Fri, 13 Mar 2015 16:24:08 +0000 (17:24 +0100)
committerFrank Brehm <frank.brehm@profitbricks.com>
Fri, 13 Mar 2015 16:24:08 +0000 (17:24 +0100)
create-grml-squash.sh

index 31d8804da3e7ab0b96cb3141c31254be3842ac81..a43378e99d8312e76485c1b6799f35850b84acc5 100755 (executable)
@@ -51,7 +51,7 @@ fi
 ORIG_IMG="/mnt/grml/live/grml64-full/grml64-full.squashfs"
 TARGET_DIR="/var/tmp/grml"
 
-PACKAGES="infiniband-diags opensm bc git libpcre3 mbuffer lsscsi bind9-host bind9utils megacli storcli lsitools storage-tools profitbricks-certificates"
+PACKAGES="infiniband-diags opensm bc git libpcre3 mbuffer lsscsi bind9-host bind9utils megacli storcli lsitools storage-tools profitbricks-certificates lvm2"
 
 MY_BASE=$(basename $0 )
 MY_DIR=$( readlink -f $( dirname $0 ) )
@@ -353,9 +353,18 @@ add_pb_repo() {
     echo
     info "Adding Profitbricks Debian repository."
 
+    local debian_version="wheezy"
+    local debv_file="${TARGET_DIR}/etc/debian_version"
+    if [[ -f "${debv_file}" ]] ; then
+        if cat "${debv_file}" | egrep -i "^(jessie|8)" >/dev/null ; then
+            debian_version="jessie"
+        fi
+    fi
+    info "Supported Debian version: ${GREEN}${debian_version}${NORMAL}"
+
     cat >${TARGET_DIR}/etc/apt/sources.list.d/profitbricks.list <<EOF
 # ProfitBricks Debian repositories
-deb http://repo.pb.local/pb-debian wheezy main non-free contrib
+deb http://repo.pb.local/pb-debian ${debian_version} main non-free contrib
 EOF
 
     export DEBIAN_FRONTEND="noninteractive"