X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=2be4689c654c5250dc43cdb4e6ad07113a225386;hp=993b0a7d0432d910d4c309c728c1a25eefa00411;hb=48cacf0ef620f5dc4a75d59e7313e8a9f40f241e;hpb=aaa4b0e3748c67c5f68a24af4ce1db79ad07a878 diff --git a/chroot-script b/chroot-script index 993b0a7..2be4689 100755 --- a/chroot-script +++ b/chroot-script @@ -256,7 +256,7 @@ hosts() { # set up /etc/network/interfaces {{{ interfaces() { - if ! [ -r /etc/network/interfaces ] ; then + if ! [ -r /etc/network/interfaces ] || ! grep -q "auto lo" /etc/network/interfaces ; then echo "Setting up /etc/network/interfaces" cat >> /etc/network/interfaces << EOF @@ -324,6 +324,11 @@ hostname() { if [ -n "$HOSTNAME" ] ; then echo "Setting hostname to ${HOSTNAME}." echo "$HOSTNAME" > /etc/hostname + + # adjust postfix configuration + if [ -r /etc/postfix/main.cf ] ; then + sed -i "s/grml/$HOSTNAME/g" /etc/postfix/main.cf + fi fi } # }}}