2006-06-09 10:50:49 by steve
Added.
This commit is contained in:
39
hooks/centos4/10-disable-tls
Executable file
39
hooks/centos4/10-disable-tls
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This script disables TLS on the new image.
|
||||
#
|
||||
# Steve
|
||||
# --
|
||||
# http://www.steve.org.uk/
|
||||
|
||||
|
||||
|
||||
prefix=$1
|
||||
dist=$2
|
||||
|
||||
|
||||
#
|
||||
# Source our common functions
|
||||
#
|
||||
if [ -e ../common.sh ]; then
|
||||
. ../common.sh
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Log our start
|
||||
#
|
||||
logMessage Script $0 starting
|
||||
|
||||
|
||||
#
|
||||
# Disable TLS and create an empty directory in its place
|
||||
#
|
||||
mv ${prefix}/lib/tls ${prefix}/lib/tls.disabled
|
||||
mkdir ${prefix}/lib/tls
|
||||
|
||||
|
||||
#
|
||||
# Log our finish
|
||||
#
|
||||
logMessage Script $0 finished
|
||||
47
hooks/centos4/20-setup-yum
Executable file
47
hooks/centos4/20-setup-yum
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This script sets up the /etc/apt/sources.list for APT.
|
||||
#
|
||||
# Steve
|
||||
# --
|
||||
# http://www.steve.org.uk/
|
||||
|
||||
|
||||
prefix=$1
|
||||
|
||||
|
||||
#
|
||||
# Source our common functions
|
||||
#
|
||||
if [ -e ../common.sh ]; then
|
||||
. ../common.sh
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Log our start
|
||||
#
|
||||
logMessage Script $0 starting
|
||||
|
||||
#
|
||||
# Transform yum so that it works.
|
||||
#
|
||||
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
|
||||
|
||||
#
|
||||
# Update yum
|
||||
#
|
||||
chroot ${prefix}/usr/bin/yum update
|
||||
|
||||
#
|
||||
# Log our finish
|
||||
#
|
||||
logMessage Script $0 finished
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user