Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] emerge --config
Date: Thu, 21 Aug 2014 11:50:52
Message-Id: CAGfcS_k0YKiWD-vF=J3rmMtFy7-mYyL1fRRYe-ngwzVr4VxS-Q@mail.gmail.com
In Reply to: [gentoo-user] emerge --config by Bill Kenworthy
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