2

I wrote a BASH script for doing an unattendend install on an ARM based Debian system. One of the packages being installed is samba.

I added

apt-get -y install samba

into my setup routine, but apt-get hangs due an ncurse configuration window for Samba workgroup.

How can I pass such windows? My script download the right smb.conf etc. after apt-get installed the packages.

Steven Monday
  • 13,599
  • 4
  • 36
  • 45

3 Answers3

0

Set the environment variable DEBIAN_FRONTEND to noninteractive, e.g.:

sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y samba
0

What you need should be described in man 7 debconf in the section Priorities. Another way is described in the Frontend section (noninteractive)

krissi
  • 3,387
  • 1
  • 19
  • 22
-1

-y or --assume-yes really should do it. Apparently not. :)

I think the thing to do is to put the answer in to the debconf database before installing the package. Then it'll already know the answer and shouldn't prompt. There's an example of doing that here.

mattdm
  • 6,600
  • 1
  • 26
  • 48
  • Hello, the problem is that is not an apt-get question like 'Install samba (needs more xx MB on disc)'. It's a special 'task' which runs due an apt-get install samba command. This command displays an GUI using ncurses and ask for (in this case) a workgroups name. It seemed I can't supress this dialog using the -y option. – Daniel Völkerts Dec 05 '10 at 14:48
  • Oh, right. See edited answer. :) – mattdm Dec 05 '10 at 14:57
  • Thanks in advanced. I finally got this at google too ,) Thanks very much for the example. It helped me a lot. – Daniel Völkerts Dec 06 '10 at 08:29
  • 2
    That url no longer works. – lukad Aug 20 '14 at 13:34