diff --git a/hooks/fedora/10-disable-tls b/hooks/fedora/10-disable-tls new file mode 100755 index 0000000..70471ab --- /dev/null +++ b/hooks/fedora/10-disable-tls @@ -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 diff --git a/hooks/fedora/30-fix-inittab b/hooks/fedora/30-fix-inittab new file mode 100755 index 0000000..9a3d792 --- /dev/null +++ b/hooks/fedora/30-fix-inittab @@ -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 diff --git a/hooks/fedora/90-make-fstab b/hooks/fedora/90-make-fstab new file mode 100755 index 0000000..00d9c56 --- /dev/null +++ b/hooks/fedora/90-make-fstab @@ -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 < ${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