setup.sh: fail gracefully on lack of sudo, update references to missing shell functions