projects
/
grml-debootstrap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
430c060
)
Add set process for /etc/mailname [Closes: issue1315]
author
Markus Rekkenbeil
<mre@mobi4friends.de>
Sat, 30 Aug 2014 17:38:07 +0000
(19:38 +0200)
committer
Michael Prokop
<mika@grml.org>
Sat, 30 Aug 2014 19:01:41 +0000
(12:01 -0700)
chroot-script
patch
|
blob
|
history
diff --git
a/chroot-script
b/chroot-script
index
3a8dca9
..
c291ffc
100755
(executable)
--- a/
chroot-script
+++ b/
chroot-script
@@
-489,6
+489,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
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
}
# }}}
fi
}
# }}}