From a0d4b3595bea5b9bb5b8bb87e87b1ec7f19ad029 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Tue, 26 Nov 2019 17:55:23 +0100 Subject: [PATCH] Fixing postinstall-scripts/init-puppet --- postinstall-scripts/init-puppet | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/postinstall-scripts/init-puppet b/postinstall-scripts/init-puppet index db6695a..be26765 100755 --- a/postinstall-scripts/init-puppet +++ b/postinstall-scripts/init-puppet @@ -451,6 +451,17 @@ empty_repo_file() { #------------------------------------------------------------------------------ empty_oracle_repo_files() { + local tool= + + if type -p dnf >/dev/null ; then + tool='dnf' + elif type -p yum >/dev/null ; then + tool='yum' + else + error "The operating system is not supported." + return 0 + fi + local -a stems=("oracle-linux-ol7" "uek-ol7" "virt-ol7" "public-yum-ol7") local cleaned_old_repo="n" local stem= -- 2.39.5