Index: usr.sbin/jail/jail.c =================================================================== --- usr.sbin/jail/jail.c +++ usr.sbin/jail/jail.c @@ -451,6 +451,16 @@ if (next_command(j)) continue; jail_create_done: + /* Stop the jail when not in failure and not persisting. */ + if ((j->flags & JF_PERSIST) && !(j->flags & JF_FAILED)) { + j->flags = JF_STOP; + j->comparam = stopcommands; + j->comstring = NULL; + dep_reset(j); + + if (!dep_check(j)) + requeue(j, &ready); + } clear_persist(j); if (jfp != NULL) print_jail(jfp, j, oldcl, 1);