1
0
mirror of synced 2026-04-27 04:46:28 +00:00

2006-05-23 17:35:07 by steve

Setup yum for centos4.  Might work for other distros.
This commit is contained in:
steve
2006-05-23 17:35:07 +00:00
parent b23eed9aee
commit 5f7f728ffc

View File

@@ -20,7 +20,9 @@ if [ "${rpmstrap}" ]; then
fi
cat <<E_O_APT > ${prefix}/etc/apt/sources.list
if [[ -d ${prefix}/etc/apt ]]; then
cat <<E_O_APT > ${prefix}/etc/apt/sources.list
#
# /etc/apt/sources.list
#
@@ -42,8 +44,30 @@ deb-src http://security.debian.org/ stable/updates main contrib non-free
E_O_APT
#
# Now that the sources have been setup make sure the system is up to date.
#
chroot ${prefix} /usr/bin/apt-get update
else
#
# Now that the sources have been setup make sure the system is up to date.
#
chroot ${prefix} /usr/bin/apt-get update
#
# Setup yum if we've got it installed.
if [[ -e ${prefix}/etc/yum.repos.d/ ]]; then
#
# This works for centos4 - dunno about the rest yet.
#
perl -pi.bak -e 's/enabled=0/enabled=1/g' *.repo
perl -pi.bak -e 's/gpgcheck=1/gpgcheck=0/g' *.repo
perl -pi.bak -e 's/^\#baseurl/baseurl/g' *.repo
perl -pi.bak -e 's/^mirrorlist/#mirrorlist/g' *.repo
#
# Update the package lists that Yum knows about.
#
if [[ -x ${prefix}/usr/bin/yum ]]; then
chroot ${prefix}/usr/bin/yum update
fi
fi
fi