]> Frank Brehm's Git Trees - pixelpark/create-terraform.git/commitdiff
Fixing postinstall-scripts/init-puppet
authorFrank Brehm <frank.brehm@pixelpark.com>
Tue, 26 Nov 2019 16:55:23 +0000 (17:55 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Tue, 26 Nov 2019 16:55:23 +0000 (17:55 +0100)
postinstall-scripts/init-puppet

index db6695af05f5dbf3a05bece94e00f4f72d75bf13..be2676552b89e0d9358f3c2a07bd41243ffe0e59 100755 (executable)
@@ -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=