X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=289773ba02a597b0a6ac0dc3f814b1171070f746;hp=3a8dca903f03e59efb51d1dce7919bf2f903c955;hb=86c53253ecc5dd7971ab6e8d04b285c08265906a;hpb=430c060be15f60f508428edbc03ea70d9bf04399 diff --git a/chroot-script b/chroot-script index 3a8dca9..289773b 100755 --- a/chroot-script +++ b/chroot-script @@ -86,6 +86,16 @@ chrootmirror() { fi fi + # LTS support + case "$RELEASE" in + squeeze) + if [ -n "$MIRROR" ] ; then + echo "Release matching $RELEASE - enabling LTS support in sources.list" + echo "deb $MIRROR ${RELEASE}-lts $COMPONENTS" >> /etc/apt/sources.list + fi + ;; + esac + # add security.debian.org: case "$RELEASE" in unstable|sid|lenny) ;; # no security pool available @@ -489,6 +499,20 @@ hostname() { sed -i "s/^inet_interfaces = .*/inet_interfaces = loopback-only/" /etc/postfix/main.cf grep -q inet_interfaces /etc/postfix/main.cf || echo 'inet_interfaces = loopback-only' >> /etc/postfix/main.cf fi + if [ -r /etc/mailname ] ; then + # adjust /etc/mailname + local etc_mail_domain=$(/bin/dnsdomainname 2>/dev/null || echo localdomain) + case "$HOSTNAME" in + *.*) + local mailname="$HOSTNAME" + ;; + *) + local mailname="${HOSTNAME}.${etc_mail_domain}" + ;; + esac + echo "Setting mailname to ${mailname}" + echo "$mailname" > /etc/mailname + fi fi } # }}}