Pass filename as maxpasswd argument

The 2.0 version of maxpasswd requires that the filename is given as the
first argument. Only 2.1 and newer versions check for the default key
file.
This commit is contained in:
Markus Mäkelä 2017-05-30 14:10:21 +03:00
parent f4d97c3fbf
commit b0b8d000f8

View File

@ -31,7 +31,7 @@ void try_password(TestConnections* Test, char * pass)
*/
Test->tprintf("Encrypting password: %s", pass);
Test->set_timeout(30);
int rc = Test->ssh_maxscale(true, "maxpasswd '%s' | tr -dc '[:xdigit:]' > /tmp/pw.txt && "
int rc = Test->ssh_maxscale(true, "maxpasswd /var/lib/maxscale/ '%s' | tr -dc '[:xdigit:]' > /tmp/pw.txt && "
"sed -i 's/user=.*/user=test/' /etc/maxscale.cnf && "
"sed -i \"s/passwd=.*/passwd=$(cat /tmp/pw.txt)/\" /etc/maxscale.cnf && "
"service maxscale restart && "