1
0
mirror of synced 2026-02-02 14:30:57 +00:00

2006-05-24 19:22:39 by steve

Temporary point in conversion to new hook script format.
This commit is contained in:
steve
2006-05-24 19:22:39 +00:00
parent 2b9a5b8893
commit 3c5c1efcf4
4 changed files with 60 additions and 30 deletions

View File

@@ -8,11 +8,8 @@
prefix=$1
dist=$2
mv ${prefix}/lib/tls ${prefix}/lib/tls.disabled
#
# Make a new /lib/tls directory in the guest, and make sure
# it cannot be modified.
#
mkdir ${prefix}/lib/tls
mkdir ${prefix}/lib/tls

View File

@@ -8,11 +8,15 @@
prefix=$1
dist=$2
if [[ -d ${prefix}/etc/apt ]]; then
#
# This function will setup the sources.list file for new installations
# of Debian GNU/Linux.
#
function setupDebianSources
{
cat <<E_O_APT > ${prefix}/etc/apt/sources.list
#
# /etc/apt/sources.list
@@ -40,25 +44,49 @@ 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
}
#
# This function sets up Yum on the new CentOS4 installations.
#
function setupCentOS4
{
perl -pi.bak -e 's/enabled=0/enabled=1/g' ${prefix}/etc/yum.repos.d/*.repo
perl -pi.bak -e 's/gpgcheck=1/gpgcheck=0/g' ${prefix}/etc/yum.repos.d/*.repo
perl -pi.bak -e 's/^\#baseurl/baseurl/g' ${prefix}/etc/yum.repos.d/*.repo
perl -pi.bak -e 's/^mirrorlist/#mirrorlist/g' ${prefix}/etc/yum.repos.d/*.repo
perl -pi.bak -e 's/\$releasever/4/g' ${prefix}/etc/yum.repos.d/*.repo
#
# Setup yum if we've got it installed.
if [ -d ${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' ${prefix}/etc/yum.repos.d/*.repo
perl -pi.bak -e 's/gpgcheck=1/gpgcheck=0/g' ${prefix}/etc/yum.repos.d/*.repo
perl -pi.bak -e 's/^\#baseurl/baseurl/g' ${prefix}/etc/yum.repos.d/*.repo
perl -pi.bak -e 's/^mirrorlist/#mirrorlist/g' ${prefix}/etc/yum.repos.d/*.repo
#
# Update the package lists that Yum knows about.
#
if [[ -x ${prefix}/usr/bin/yum ]]; then
chroot ${prefix}/usr/bin/yum update
fi
# Update the package lists that Yum knows about.
#
if [[ -x ${prefix}/usr/bin/yum ]]; then
chroot ${prefix}/usr/bin/yum update
fi
fi
}
#
# Entry point to the script.
#
case "${dist}" in
sarge|etch|sid)
setupDebianSources
;;
centos4)
setupCentOS4
;;
*)
echo "Unknown distribution. Fixme";
exit;
;;
esac

View File

@@ -9,4 +9,9 @@
# --
# http://www.steve.org.uk/
sed -i -e 's/tty[0-9]$/console/g' -e 's/^\([2-6].*:respawn*\)/#\1/' -e 's/^T/#\t/' $1/etc/inittab
prefix=$1
dist=$2
sed -i -e 's/tty[0-9]$/console/g' -e 's/^\([2-6].*:respawn*\)/#\1/' -e 's/^T/#\t/' ${prefix}/etc/inittab

View File

@@ -9,7 +9,7 @@
prefix=$1
dist=$1
##