# check available backports release version {{{
checkbackports() {
- wget -q -O/dev/null http://backports.debian.org/debian-backports/dists/${1}-backports/Release
+ wget -q -O/dev/null http://${BACKPORTSMIRROR}/dists/${RELEASE}-backports/Release
}
# }}}
# feature to provide Debian backports repos {{{
backportrepos() {
+ case "$RELEASE" in
+ squeeze)
+ BACKPORTSMIRROR="backports.debian.org/debian-backports"
+ ;;
+ *)
+ BACKPORTSMIRROR="http.debian.net/debian"
+ ;;
+ esac
if [ -n "$BACKPORTREPOS" ] ; then
- if ! checkbackports $RELEASE ; then
+ if ! checkbackports ; then
echo "Backports for ${RELEASE} are not available." >&2
exit 1
else
if ! grep -q backports /etc/apt/sources.list.d/backports.list 2>/dev/null ; then
cat >> /etc/apt/sources.list.d/backports.list << EOF
# debian backports: ${RELEASE}-backports repository:
-deb http://backports.debian.org/debian-backports ${RELEASE}-backports main
-deb-src http://backports.debian.org/debian-backports ${RELEASE}-backports main
+deb http://${BACKPORTSMIRROR} ${RELEASE}-backports main
+deb-src http://${BACKPORTSMIRROR} ${RELEASE}-backports main
EOF
fi
fi
fi
case $ARCH in
- i386) KARCH=i686 ;;
+ i386) KARCH=686 ;;
amd64) KARCH=amd64 ;;
*)
echo "Only i386 and amd64 are currently supported" >&2
# note: install busybox to be able to debug initramfs
KERNELPACKAGES="linux-image-$KVER linux-headers-$KVER busybox firmware-linux-free firmware-linux"
DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL $KERNELPACKAGES
+ else
+ echo "Warning: Could not find a kernel for your system. Your system won't be able to boot itself!"
fi
}
# }}}