Adjust /etc/postfix/main.cf and /etc/network/interfaces
authorMichael Prokop <mika@grml.org>
Wed, 12 Nov 2008 17:19:21 +0000 (18:19 +0100)
committerMichael Prokop <mika@grml.org>
Wed, 12 Nov 2008 17:19:21 +0000 (18:19 +0100)
chroot-script
debian/changelog

index 993b0a7..2be4689 100755 (executable)
@@ -256,7 +256,7 @@ hosts() {
 
 # set up /etc/network/interfaces {{{
 interfaces() {
 
 # 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
 
      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
   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
 }
 # }}}
   fi
 }
 # }}}
index ba95205..529a455 100644 (file)
@@ -21,8 +21,11 @@ grml-debootstrap (0.23) unstable; urgency=low
     - added "--nodebootstrap": Skip debootstrap, only do configuration
       to the target
     - add -v, --verbose: Increase verbosity
     - added "--nodebootstrap": Skip debootstrap, only do configuration
       to the target
     - add -v, --verbose: Increase verbosity
+  * Edit /etc/network/interfaces as well if the file exists already,
+    we definitely need at least a loopback interface.
+  * Adjust hostname in /etc/postfix/main.cf.
 
 
- -- Michael Prokop <mika@grml.org>  Mon, 20 Oct 2008 16:09:03 +0200
+ -- Michael Prokop <mika@grml.org>  Wed, 12 Nov 2008 18:19:01 +0100
 
 grml-debootstrap (0.22) unstable; urgency=low
 
 
 grml-debootstrap (0.22) unstable; urgency=low