2006-06-09 11:02:22 by steve
Added.
This commit is contained in:
40
hooks/centos4/80-install-modules
Executable file
40
hooks/centos4/80-install-modules
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Install modules from the host system into 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
|
||||
|
||||
|
||||
#
|
||||
# Copy the modules from the host to the new system - we should only
|
||||
# really copy the *correct* modules, but we don't know what they are.
|
||||
#
|
||||
mkdir -p ${prefix}/lib/modules
|
||||
cp -R /lib/modules/*/ ${prefix}/lib/modules
|
||||
|
||||
|
||||
#
|
||||
# Log our finish
|
||||
#
|
||||
logMessage Script $0 finished
|
||||
83
hooks/centos4/90-make-fstab
Executable file
83
hooks/centos4/90-make-fstab
Executable file
@@ -0,0 +1,83 @@
|
||||
#!/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 ../common.sh ]; then
|
||||
. ../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