1 |
On Thu, Aug 21, 2014 at 7:07 AM, Bill Kenworthy <billk@×××××××××.au> wrote: |
2 |
> Hi, |
3 |
> I am building some VM's using scripts and want to run "emerge --config |
4 |
> mariadb" automaticly. However it asks for a new root password (entered |
5 |
> twice) as part of the process - I was going to make an expect script to |
6 |
> enter the password for me ... but I thought someone might know a better way? |
7 |
|
8 |
You might try appending <<< "password\npassword" to the script |
9 |
invocation - that puts "password\npassword" into stdin. |
10 |
|
11 |
It doesn't always work, and it won't work if you need some kind of |
12 |
interactivity, or a process clears input before prompting, etc. Then |
13 |
you need something like expect. |
14 |
|
15 |
-- |
16 |
Rich |