-# if we have a devel-version or a daily snapshot
-# let's activate grml-testing by default:
-if [ -r "$target"/etc/grml_version ] ; then
- # if awk '{print $1}' /etc/grml_version | grep -q devel ; then
- if grep -e devel -e autobuild /etc/grml_version 1>/dev/null ; then
- sed -i 's|^#\(.*deb.*deb.grml.org.*grml-testing\)|\1|' /etc/apt/sources.list
+# if we stil do not know which Debian suite we are building assume "stable"
+[ -n "$SUITE" ] || SUITE="stable"
+
+# configure official Debian repositories:
+cat > "$DEBIAN_SOURCES_LIST" << EOF
+# official debian repository (mirror selected via geo-ip):
+ deb http://cdn.debian.net/debian/ $SUITE main contrib non-free
+# deb-src http://cdn.debian.net/debian/ $SUITE main contrib non-free
+
+# official debian repository:
+# deb http://ftp.debian.org/debian/ sid main contrib non-free
+# deb-src http://ftp.debian.org/debian/ sid main contrib non-free
+
+# official debian DE repository:
+# deb http://ftp.de.debian.org/debian/ sid main contrib non-free
+# deb-src http://ftp.de.debian.org/debian/ sid main contrib non-free
+
+# official debian AT repository:
+# deb http://ftp.at.debian.org/debian/ sid main contrib non-free
+# deb-src http://ftp.at.debian.org/debian/ sid main contrib non-free
+EOF
+
+# configure grml-stable repository:
+cat > "$GRML_SOURCES_LIST" << EOF
+# stable grml repository:
+ deb http://deb.grml.org/ grml-stable main
+# deb-src http://deb.grml.org/ grml-stable main
+EOF
+
+ENABLE_GRML_TESTING=false
+# if we have a devel-version or a daily snapshot enable grml-testing by default:
+if [ -n "$GRML_NAME" -o -n "$RELEASENAME" ] ; then
+ if echo "$GRML_NAME" "$RELEASENAME" | grep -e devel -e autobuild 1>/dev/null ; then
+ ENABLE_GRML_TESTING=true