X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=80b45ab0ac4740aeecf46d44f7463126d14a4885;hp=766a59d8eb9aed15ecc9701b82087c130b701ca7;hb=7e1e9b8dbdcf2ad71aff50ffdb032eb9df8a9e64;hpb=e426be2b57c02a85774bc72462224e4fd0260421 diff --git a/chroot-script b/chroot-script index 766a59d..80b45ab 100755 --- a/chroot-script +++ b/chroot-script @@ -2,7 +2,7 @@ # Filename: /etc/debootstrap/chroot-script # Purpose: script executed in chroot when installing Debian via grml-debootstrap # Authors: grml-team (grml.org), (c) Michael Prokop -# Bug-Reports: see http://grml.org/bugs/ +# Bug-Reports: see https://grml.org/bugs/ # License: This file is licensed under the GPL v2. ################################################################################ # GRML_CHROOT_SCRIPT_MARKER - do not remove this line unless you want to keep @@ -192,29 +192,15 @@ EOF } # }}} -# check available backports release version {{{ -checkbackports() { - wget -q -O/dev/null "http://backports.debian.org/debian-backports/dists/${1}-backports/Release" -} -# }}} - # feature to provide Debian backports repos {{{ backportrepos() { - if [ -n "$BACKPORTREPOS" ] ; then - if ! checkbackports "$RELEASE" ; then - echo "Backports for ${RELEASE} are not available." >&2 - exit 1 - else - # user might have provided their own apt sources.list - if ! grep -q backports /etc/apt/sources.list.d/backports.list 2>/dev/null ; then - cat >> /etc/apt/sources.list.d/backports.list << EOF + if [ -n "$BACKPORTREPOS" ] ; 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 ${MIRROR} ${RELEASE}-backports main +deb-src ${MIRROR} ${RELEASE}-backports main EOF - fi - fi - fi + fi } # }}} @@ -465,8 +451,12 @@ default_locales() { # adjust timezone {{{ timezone() { if [ -n "$TIMEZONE" ] ; then - echo "Adjusting /etc/localtime" - ln -sf "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime + echo "Adjusting /etc/localtime" + ln -sf "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime + + echo "Setting /etc/timezone to $TIMEZONE" + printf '%s\n' "$TIMEZONE" > /etc/timezone + fi } # }}}