setup-all-dchroots: move all main code to after function declarations