Chapter 32. check_rpmforge_repo_is_installed_and_disabled.linux.sh

#!/bin/sh

# add Dag's RPMforge repository

if [ ! -f /etc/yum.repos.d/rpmforge.repo ]
then
        wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm && \
        rpm -ihv rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm && rm rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

fi




# make sure Dag's repository is disabled, must specify "yum --enablerepo=rpmforge" if we want to use it,
# just to be conservative about what gets loaded

if grep 'enabled = 1' /etc/yum.repos.d/rpmforge.repo >/dev/null
then
        sed -e 's:enabled = 1:enabled = 0:' -i /etc/yum.repos.d/rpmforge.repo
fi