On Thu, 3 Mar 2011 14:11:30 -0600 "Brian Gilomen" <gilo...@ameritech.net> wrote:
> From: Ricardo Mones <mo...@debian.org> > Unpacking ssmtp (from .../ssmtp_2.64-4_armel.deb) ... > E: Sub-process /usr/bin/dpkg returned an error code (1) > I found it's because value returned by hostname is not known. Adding it to > /etc/hosts fixed the problem and installation finished correctly. > To my understanding this should not break installation, even if the value > is not suitable to run ssmtp and will make it fail on run. > I am experiencing the same error. When you state "Adding it to /etc/hosts > fixed the problem" what is the "it"? In other words, what hostname would be > appropriate to add to the /etc/hosts file? What would be the appropriate > format/syntax? This issue is still present - it affects systems without a FQDN, for example containers. The issue is that postinst calls "hostname --fqdn" and fails if that command does not work. Per the man-page of hostname, adding an entry for 127.0.1.1 will make this work, ie if /etc/hosts contains 127.0.1.1 systemname.example.com systemname then hostname --fqdn returns systemname.example.com and that will allow installation to proceed. I think maybe postinst should fall back to calling "hostname" or even "localhost" if there is no fqdn? at the very least, it should tell the user to set a fqdn instead of just failing