-# 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
+# retrieve build information ($SUITE):
+if [ -r $target/etc/grml_live_version ] ; then
+ . $target/etc/grml_live_version
+fi
+
+# 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:
+ deb http://cdn.debian.net/debian/ $SUITE main contrib non-free
+ deb-src http://cdn.debian.net/debian/ $SUITE 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