diff --git a/conf/explorer/os b/conf/explorer/os index b636d980..6684ff78 100755 --- a/conf/explorer/os +++ b/conf/explorer/os @@ -49,6 +49,12 @@ if grep -q ^Fedora /etc/redhat-release 2>/dev/null; then exit 0 fi +# CentOS is also based on Redhat, this return before redhat! +if grep -q ^CentOS /etc/redhat-release 2>/dev/null; then + echo centos + exit 0 +fi + if [ -f /etc/redhat-release ]; then echo redhat exit 0 diff --git a/conf/explorer/os_version b/conf/explorer/os_version index 5f7120c0..b26560ad 100755 --- a/conf/explorer/os_version +++ b/conf/explorer/os_version @@ -39,7 +39,7 @@ case "$($__explorer/os)" in macosx|*bsd|solaris) uname -r ;; - redhat) + redhat|centos) cat /etc/redhat-release ;; suse) diff --git a/conf/type/__package/manifest b/conf/type/__package/manifest index f41cceac..48818dd8 100755 --- a/conf/type/__package/manifest +++ b/conf/type/__package/manifest @@ -19,7 +19,7 @@ # # # __package is an abstract type which dispatches to the lower level -# __package_$name types which do the actual interaction with the packaging +# __package_$name types which do the actual interaction with the packaging # system. # @@ -33,7 +33,7 @@ else archlinux) type="pacman" ;; debian|ubuntu) type="apt" ;; gentoo) type="emerge" ;; - fedora) type="yum" ;; + fedora|redhat|centos) type="yum" ;; *) echo "Don't know how to manage packages on: $os" >&2 exit 1 diff --git a/conf/type/__package_yum/gencode-remote b/conf/type/__package_yum/gencode-remote index 8bd81ca0..e43712f8 100755 --- a/conf/type/__package_yum/gencode-remote +++ b/conf/type/__package_yum/gencode-remote @@ -29,7 +29,11 @@ fi state="$(cat "$__object/parameter/state")" -opts="--assumeyes --quiet" +if grep -q -E "(centos|redhat)" "$__global/explorer/os"; then + opts="-y --quiet" +else + opts="--assumeyes --quiet" +fi not_installed="^no package provides"