Updated the handling of /lib/tls to only disable it on Sarge installs. Use libc6-xen elsewhere if available. TODO: Fix ubuntu installation types.
54 lines
832 B
Bash
Executable File
54 lines
832 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# This script disables TLS on the new image or installs a Xen-aware
|
|
# version of libc where it is available.
|
|
#
|
|
# 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
|
|
|
|
|
|
|
|
|
|
#
|
|
# For sid or etch systems we install libc6-xen
|
|
#
|
|
# For sarge we don't have that option, so we disable TLS.
|
|
#
|
|
case "${dist}" in
|
|
etch|sid)
|
|
logMessage "Installing xen-aware libc6"
|
|
|
|
installDebianPackage ${prefix} libc6-xen
|
|
;;
|
|
*)
|
|
logMessage "Disabling TLS"
|
|
mv ${prefix}/lib/tls ${prefix}/lib/tls.disabled
|
|
mkdir ${prefix}/lib/tls
|
|
;;
|
|
esac
|
|
|
|
|
|
#
|
|
# Log our finish
|
|
#
|
|
logMessage Script $0 finished
|