This is the slightly modified patch attached to PR 295777.
I moved the touch /etc/jail.conf line from the end to it's own section at the beginning, because this is part of the jail preparation and fits better there. Also, rephrase a sentence to remove a comma and put "and" there instead.
Other than that, it is the original patch by the author.