2006-06-25 20:05:47 by steve
Added minimal files to customise fedora core 4
This commit is contained in:
40
hooks/fedora/10-disable-tls
Executable file
40
hooks/fedora/10-disable-tls
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This script disables TLS on the new image.
|
||||
#
|
||||
# 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
|
||||
|
||||
|
||||
#
|
||||
# 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
|
||||
41
hooks/fedora/30-fix-inittab
Executable file
41
hooks/fedora/30-fix-inittab
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This script does two things:
|
||||
#
|
||||
# 1. Sets the console type for the first terminal to 'console'.
|
||||
# 2. Comments out all virtual terminals which aren't on the first console.
|
||||
#
|
||||
# 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
|
||||
|
||||
|
||||
#
|
||||
# Do the transformation.
|
||||
#
|
||||
sed -i -e 's/tty[0-9]$/console/g' -e 's/^\([2-6].*:respawn*\)/#\1/' -e 's/^T/#\t/' ${prefix}/etc/inittab
|
||||
|
||||
|
||||
#
|
||||
# Log our finish
|
||||
#
|
||||
logMessage Script $0 finished
|
||||
85
hooks/fedora/90-make-fstab
Executable file
85
hooks/fedora/90-make-fstab
Executable file
@@ -0,0 +1,85 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This script is responsible for setting up /etc/fstab upon the
|
||||
# new instance.
|
||||
#
|
||||
# This should be a simple job, but it is complicated by some of the
|
||||
# differences between filesystems - some root filesystems will require
|
||||
# the installation of new packages, and we have to handle that here.
|
||||
#
|
||||
# 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
|
||||
|
||||
|
||||
#
|
||||
# Options to mount the root filesystem with, we need to have
|
||||
# different options for xfs.
|
||||
#
|
||||
# The default option works for ext2, ext3, and reiserfs.
|
||||
#
|
||||
options="errors=remount-ro"
|
||||
|
||||
case "${fs}" in
|
||||
xfs)
|
||||
options="defaults"
|
||||
;;
|
||||
esac
|
||||
|
||||
logMessage Filesystem options are ${options}
|
||||
|
||||
|
||||
#
|
||||
# Make sure we use ide style device names if required
|
||||
#
|
||||
device=sda
|
||||
if [ "${ide}" ]; then
|
||||
device=hda
|
||||
fi
|
||||
|
||||
#
|
||||
# Now we have the options we can create the fstab.
|
||||
#
|
||||
cat <<E_O_FSTAB > ${prefix}/etc/fstab
|
||||
/dev/${device}1 / ${fs} ${options} 0 1
|
||||
/dev/${device}2 none swap sw 0 0
|
||||
proc /proc proc defaults 0 0
|
||||
E_O_FSTAB
|
||||
|
||||
|
||||
#
|
||||
# Finally we can install any required packages for the given root
|
||||
# filesystem
|
||||
#
|
||||
#case "${fs}" in
|
||||
# xfs)
|
||||
# install_package xfsprogs
|
||||
# ;;
|
||||
# reiserfs)
|
||||
# install_package reiserfsprogs
|
||||
# ;;
|
||||
#esac
|
||||
|
||||
|
||||
#
|
||||
# Log our finish
|
||||
#
|
||||
logMessage Script $0 finished
|
||||
Reference in New Issue
Block a user