1
0
mirror of synced 2026-02-16 12:12:51 +00:00
Files
xen-tools.xen-tools/hooks/fedora-core-6/20-setup-yum
Stéphane Jourdois 09f38740c8 Use dom0 resolv.conf when chrooting
Temporarily use resolv.conf from dom0 when chrooting into domU,
to be able to run apt-get and yum inside chroot.

This permits to use different nameservers in domU, and does not
break install nor offline update from dom0.
2010-07-10 10:51:38 +02:00

47 lines
545 B
Bash
Executable File

#!/bin/sh
#
# This script sets up the Yum for CentOS4.
#
# Steve
# --
# http://www.steve.org.uk/
prefix=$1
#
# Source our common functions
#
if [ -e /usr/lib/xen-tools/common.sh ]; then
. /usr/lib/xen-tools/common.sh
else
. ./hooks/common.sh
fi
#
# Log our start
#
logMessage Script $0 starting
#
# Update yum
#
if [ ! -d ${prefix}/proc ]; then
mkdir -p ${prefix}/proc
fi
mount -o bind /proc ${prefix}/proc
chroot ${prefix} /usr/bin/yum update
umount ${prefix}/proc
#
# Log our finish
#
logMessage Script $0 finished