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 ) )
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"