From 35888780457f1126435692b9b336c42a50f33fff Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Sat, 2 Mar 2013 13:24:18 -0500 Subject: [PATCH] pwmc: fix --new-key-file. --- src/pwmc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pwmc.c b/src/pwmc.c index ea61f65f..e1f361a3 100644 --- a/src/pwmc.c +++ b/src/pwmc.c @@ -1155,7 +1155,11 @@ save_command (const char *line) if (rc) return rc; + if (new_keyfile || keyfile) + pwmd_setopt (pwm, PWMD_OPTION_OVERRIDE_INQUIRE, 1); + rc = pwmd_save (pwm, line, inquire_cb, inq); + pwmd_setopt (pwm, PWMD_OPTION_OVERRIDE_INQUIRE, 0); free_inquire (inq); return rc; } @@ -1381,9 +1385,8 @@ finalize () fprintf (stderr, N_("Saving changes ...\n")); } - rc = pwmd_save (pwm, args, inquire_cb, NULL); + rc = save_command (args); pwmd_free (args); - if (!rc) no_passphrase = 0; // reset to avoid usage error on the next SAVE } -- 2.11.4.GIT