forked from ungleich-public/cdist
Fixed package_yum to work on CentOS
This commit is contained in:
parent
d32d69c933
commit
9e7048b25d
4 changed files with 14 additions and 4 deletions
|
@ -49,6 +49,12 @@ if grep -q ^Fedora /etc/redhat-release 2>/dev/null; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
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
|
if [ -f /etc/redhat-release ]; then
|
||||||
echo redhat
|
echo redhat
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -39,7 +39,7 @@ case "$($__explorer/os)" in
|
||||||
macosx|*bsd|solaris)
|
macosx|*bsd|solaris)
|
||||||
uname -r
|
uname -r
|
||||||
;;
|
;;
|
||||||
redhat)
|
redhat|centos)
|
||||||
cat /etc/redhat-release
|
cat /etc/redhat-release
|
||||||
;;
|
;;
|
||||||
suse)
|
suse)
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# __package is an abstract type which dispatches to the lower level
|
# __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.
|
# system.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ else
|
||||||
archlinux) type="pacman" ;;
|
archlinux) type="pacman" ;;
|
||||||
debian|ubuntu) type="apt" ;;
|
debian|ubuntu) type="apt" ;;
|
||||||
gentoo) type="emerge" ;;
|
gentoo) type="emerge" ;;
|
||||||
fedora) type="yum" ;;
|
fedora|redhat|centos) type="yum" ;;
|
||||||
*)
|
*)
|
||||||
echo "Don't know how to manage packages on: $os" >&2
|
echo "Don't know how to manage packages on: $os" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -29,7 +29,11 @@ fi
|
||||||
|
|
||||||
state="$(cat "$__object/parameter/state")"
|
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"
|
not_installed="^no package provides"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue