diff --git a/conf/type/__package_yum/gencode-remote b/conf/type/__package_yum/gencode-remote index 536b7708..e20e0001 100755 --- a/conf/type/__package_yum/gencode-remote +++ b/conf/type/__package_yum/gencode-remote @@ -18,15 +18,9 @@ # along with cdist. If not, see . # # -# Manage packages with Pacman (mostly archlinux) +# Manage packages with yum (mostly Fedora) # -# Debug -# exec >&2 -# set -x - -pacopts="--noconfirm --noprogressbar" - if [ -f "$__object/parameter/name" ]; then name="$__object/parameter/name" else @@ -34,19 +28,17 @@ else fi state="$(cat "$__object/parameter/state")" -pkg_version="$(cat "$__object/explorer/pkg_version")" +opts="--assumeyes --quiet" case "$state" in installed) - - # Empty? Not installed. - if [ -z "$pkg_version" ]; then - echo pacman "$pacopts" -S \"$name\" + if grep -q "is not installed\$" "$__object/explorer/pkg_version"; then + echo yum $opts install \"$name\" fi ;; uninstalled) - if [ "$pkg_version" ]; then - echo pacman "$pacopts" -R \"$name\" + if ! grep -q "is not installed\$" "$__object/explorer/pkg_version"; then + echo yum $opts remove \"$name\" fi ;; esac