Move code for 'run as boot' into boot plugin (was removed from commons)