1 |
On Sat, 2005-09-10 at 20:03 +0200, Francesco R wrote: |
2 |
> Maurice van der Pot wrote: |
3 |
> |
4 |
> >Is this path going to be published somewhere or is this mail it? |
5 |
> > |
6 |
> > |
7 |
> Not from me atm, I feel very bad at writing anglish documentation. An |
8 |
> eventual reader sure feel worst. |
9 |
> |
10 |
> >On Thu, Sep 08, 2005 at 01:08:06PM +0200, Francesco R wrote: |
11 |
> > |
12 |
> > |
13 |
> >>cmd# ebuild /var/db/pkg/dev-db/mysql-4.1.14/mysql-4.1.14.ebuild config |
14 |
> >> |
15 |
> >> |
16 |
> >This asks for a password, but not all passwords can be entered. |
17 |
> >Specifically one with a ` in it fails =] |
18 |
> > |
19 |
> >Also, when it outputs: |
20 |
> > "Check the password" |
21 |
> >it is asking you to enter the password again. I wasn't sure how to |
22 |
> >interpret this, because the password was shown on the screen so it might |
23 |
> >have been asking me to verify it and type ok or something. |
24 |
> > |
25 |
> > |
26 |
> It's a mixture, I've received a suggestion in bugzilla on howto hide the |
27 |
> password, but need to be tested on all platform before. |
28 |
> |
29 |
|
30 |
Just use bash's built-in read function: |
31 |
|
32 |
----- |
33 |
local password newpasswd |
34 |
# Read the password into $password |
35 |
read -sp "Please enter password: " password |
36 |
# Just echo a newline so that next output start on new line |
37 |
echo |
38 |
# Confirm password into $newpassword |
39 |
read -sp "Please re-enter password: " newpassword |
40 |
echo |
41 |
# Verify that the passwords match |
42 |
if [[ ${password} != "${newpassword}" ]] ; then |
43 |
eerror "Passwords did not match!" |
44 |
die "Passwords did not match!" |
45 |
fi |
46 |
----- |
47 |
|
48 |
Or something to that regards. |
49 |
|
50 |
|
51 |
-- |
52 |
Martin Schlemmer |