Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

-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.

share|improve this answer
    
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 5 '10 at 14:48
    
Oh, right. See edited answer. :) –  mattdm Dec 5 '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 6 '10 at 8:29
    
That url no longer works. –  lukad Aug 20 at 13:34

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.