title: APT flag --yes doesn't affect prompt in postinst
body: <p>Here's the thing.</p>
  <p>We have a package which asks after installation whether we want to do partitioning or not. In non-interactive mode (docker build in my case) i'd like to do a partitioning without asking a question.</p>
  <p>I have <code>postinst</code> that as this block of script:</p>
  <pre class="lang-sh prettyprint-override"><code>while [[ $answ != &quot;yes&quot; &amp;&amp; $answ != &quot;no&quot; ]]; do
    echo -n &quot;Should i create all needed DB-partitions for current and next time periods? [yes/no] &quot;
    read answ
    if [[ $answ == &quot;yes&quot; ]]; then
      # do actions
    fi
  done
  </code></pre>
  <p>But when i am installing this package via APT inside Docker build with <code>--yes</code> flag or <code>yes | apt install ...</code> and <code>DEBIAN_FRONTEND=noninteractive</code> envvar - it doesn't answers on that prompt and goes into infinite loop, overflowing build log.</p>
  <p>How can i workaround that?</p>