aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--init.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/init.c b/init.c
index c90cb5d..24f1a7f 100644
--- a/init.c
+++ b/init.c
@@ -1674,8 +1674,13 @@ do_option_warnings (struct context *c)
if (o->ping_send_timeout && !o->ping_rec_timeout)
msg (M_WARN, "WARNING: --ping should normally be used with --ping-restart or --ping-exit");
- if ((o->username || o->groupname || o->chroot_dir) && (!o->persist_tun || !o->persist_key))
- msg (M_WARN, "WARNING: you are using user/group/chroot without persist-key/persist-tun -- this may cause restarts to fail");
+ if (o->username || o->groupname || o->chroot_dir)
+ {
+ if (!o->persist_tun)
+ msg (M_WARN, "WARNING: you are using user/group/chroot without persist-tun -- this may cause restarts to fail");
+ if (!o->persist_key && !o->pkcs11_id)
+ msg (M_WARN, "WARNING: you are using user/group/chroot without persist-key -- this may cause restarts to fail");
+ }
#if P2MP
if (o->pull && o->ifconfig_local && c->first_time)