[ -e /root/pki ] && refuse "/root/pki already exists; move it away and start again" # Reset removes every package installed from here on, by setup or by the # tasks, and only those. pkgs_now() { if is_rhel; then rpm -qa --qf '%{NAME}\n'; else dpkg-query -W -f '${db:Status-Abbrev} ${Package}\n' | awk '$1 == "ii" { print $2 }'; fi | sort -u; } pkgs_now >"$LAB_STATE/pkgs-before" command -v openssl >/dev/null || pkg_install openssl true