1
0
mirror of synced 2026-04-28 13:07:29 +00:00
Files
xen-tools.xen-tools/etc/hook.d/10-disable-tls
steve ebd526bb0d 2006-05-26 15:17:57 by steve
Install libc6-xen on sid/etch systems.
2006-05-26 15:17:57 +00:00

87 lines
1.0 KiB
Bash
Executable File

#!/bin/sh
#
# This script disables TLS on the new image.
#
# Steve
# --
# http://www.steve.org.uk/
prefix=$1
dist=$2
#
# Disable TLS and create an empty directory.
#
function disableTLS
{
mv ${prefix}/lib/tls ${prefix}/lib/tls.disabled
mkdir ${prefix}/lib/tls
}
#
# Install a Debian package onto the new system.
#
function installDebianPackage
{
package=$1
DEBIAN_FRONTEND=noninteractive chroot ${prefix} /usr/bin/apt-get --yes --force-yes install ${package}
}
#
# This function will disable TLS and install 'libc6-xen' on sid/etch
# systems.
#
function setupDebian
{
disableTLS
#
# For sid + etch systems install libc6-xen
#
case "${dist}" in
etch|sid)
installDebianPackage libc6-xen
installDebianPackage libc6-xen
;;
esac
}
#
# Handle CentOS
#
function setupCentOS4
{
disableTLS
}
#
# Entry point to the script.
#
case "${dist}" in
sarge|etch|sid)
setupDebian
;;
centos4)
setupCentOS4
;;
*)
echo "Unknown distribution '${dist}'. Fixme";
exit;
;;
esac