Bug 28493: Make koha-passwd display the username

to test...

1/ run command
 $ sudo koha-passwd dev1
 Password for dev1: CraZyPa$$WoRD!!
 Press enter to clear the screen...
 ^C

2/ apply patch

3/ run command again, note 'username' section
 $ sudo koha-passwd dev1
 Username for dev1: koha_dev1  <<<<<<<<<<<<
 Password for dev1: CraZyPa$$WoRD!!
 Press enter to clear the screen...
 ^C

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Mason James 2022-09-21 23:38:59 +12:00 committed by Tomas Cohen Arazi
parent 1763b136d1
commit 4ce7f8c493
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -45,8 +45,10 @@ EOF
for name in "$@"
do
if is_instance $name ; then
user=$(xmlstarlet sel -t -v 'yazgfs/config/user' /etc/koha/sites/$name/koha-conf.xml);
passwd=$(xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/$name/koha-conf.xml);
if [ -t 1 ]; then
echo "Username for $name: $user"
echo "Password for $name: $passwd"
echo "Press enter to clear the screen..."
read anykey