On Sat, 20 Nov 2010, Boyd Stephen Smith Jr. wrote: > In <20101120223808.ga15...@mea.homelinux.org>, Mats Erik Andersson wrote: > >Question: Is there some mechanism I can use in the postinst > > script that lets me determine whether the upgrade > > is being conducted in non-interactive mode? > > First, you should *assume* non-interactive mode. > > To test for interactivity, you could try opening /dev/tty.[1] It's not
This a good answer to the question asked but the question is wrong. Or at least it doesn't give us enough information to understand the nature of the problem. We have debconf to handle user-interaction and the script should not have to care if someone typed the answer or if it's the default answer recorded in the debconf template. Why is the postinst failing in non-interactive mode? Are you using some home-made stuff instead of debconf? If not, why is the default debconf answer not working? Cheers, -- Raphaël Hertzog ◈ Debian Developer Follow my Debian News ▶ http://RaphaelHertzog.com (English) ▶ http://RaphaelHertzog.fr (Français) -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20101121082549.gd11...@rivendell.home.ouaza.com