• Linux
  • June 2018
    M T W T F S S
    « May   Jul »
     123
    45678910
    11121314151617
    18192021222324
    252627282930  
  • Meta

  • Follow me on Twitter

  • Advertisements

Non-interactive script messages

I’ve got a couple computers that are running most of the time but I don’t actually get on them regularly so I placed a script to run updates  in /etc/cron.weekly. The script creates a log file in my home folder so I can look and see if there were any errors. I noticed the following lines in the log files:

z-update log #1
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:

z-update log #2
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:

The messages appeared following the execution of apt-get dist-upgrade. The updates seemed to have completed without error but these messages merited further investigation. I also noticed the same sort of messages when I watched the progress of updates done with Mint’s Update Manager.

It appears that the command was expecting some king of user interaction even though I’d include the -y and -q flags. My research indicated that setting the DEBIAN_FRONTEND environment variable to “noninteractive” might solve the problem so I changed that line in the script to read:

DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -yq 2>> $LOGFILE >> $LOGFILE

I checked the log file on one of the computers after the script’s scheduled run this morning and saw that the messages did not appear. Apparently, the fix worked. I can’t say this would work for others. The computers on which the messages appeared are both running Linux Mint 18.3.

Advertisements

One Response

  1. A check of the logs from the two weekly updates showed no signs of the aforementioned messages. I’m calling the problem fixed.

    The messages may still be appearing in the Update Manager text window (I haven’t checked recently) but I suspected it is. There’s probably much I can do about that. I’d have to leave it to whoever manages that piece of software. It doesn’t hurt anything, I just didn’t want to see it in my log file.

Comments are closed.

%d bloggers like this: