ash: mkinit: Split reset into exitreset and reset

Upstream commit:

    Date: Sat, 19 May 2018 02:39:40 +0800
    mkinit: Split reset into exitreset and reset

    Previously reset was called after exitshell.  This was changed
    so that it was called before exitshell because certain state needed
    to be reset in order for the EXIT trap to work.

    However, this caused issues because certain other states (such
    as local variables) should not be reset.  This patch fixes this
    by creating a new function exitreset that is called prior to
    exitshell and moving reset back to its original location.

    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
1 file changed