Home > Enterprise >  Force yes in m-a prepare on Debian
Force yes in m-a prepare on Debian

Time:01-07

I'm trying to write a simple shell script to configure my wifi on Debian.

Steps:

  1. Install dependencies
  2. Run m-a prepare to configure modules

My problem is run the step 2 forcing it to use yes. When I run m-a prepare the command ask for install kernel-headers. But I need to force without asking to install.

Is there a way to force this?

CodePudding user response:

There's a program called yes which just repeatedly outputs y.

yes | m-a prepare

should work.

yes exists for the very purpose of automatically answering those prompts in scripts, with y every time. Of course, it only works if the program only asks questions that can be answer by y.

  •  Tags:  
  • Related