1
0
mirror of synced 2026-01-22 02:05:22 +00:00

Add more logMessage to centos-*/25-setup-kernel

Make as similar as possible wrt to comments and installed packages.
This commit is contained in:
Axel Beckert 2012-06-07 22:37:38 +02:00
parent 895c79ac43
commit eededbddbd
3 changed files with 13 additions and 1 deletions

4
TODO
View File

@ -110,6 +110,10 @@ Bugs to fix and features to add for 5.0
90-make-fstab does again. It works, but that cries for debugging
hell.
centos-5/25-setup-kernel centos-6/25-setup-kernel still differ and
I'm not sure if that's necessary respectively what's the common
denominator.
80-install-kernel is not yet merged into one hook script.
Common oneliners for code deduplication in the hooks/ directory:

View File

@ -29,6 +29,7 @@ chroot ${prefix} ln -s /sbin/MAKEDEV /dev/MAKEDEV
chroot ${prefix} /sbin/MAKEDEV sda sdb sdc sdd
# Create fstab
logMessage Create /etc/fstab
cat > ${prefix}/etc/fstab << EOF
# /etc/fstab: static file system information.
#
@ -47,11 +48,15 @@ for i in `seq 1 $NUMPARTITIONS`; do
fi
done
# Install the kernel, grub and perl
chroot ${prefix} yum clean expire-cache
chroot ${prefix} yum -y install kernel-xen grub.x86_64 perl.x86_64 openssh-clients.x86_64
chroot ${prefix} yum -y install kernel-xen grub.x86_64 perl.x86_64
KERNELVERSION=`ls ${prefix}/boot/vmlinuz-* | sed "s#$prefix/boot/vmlinuz-##"`
logMessage "Kernel $KERNELVERSION found"
# Create grub's menu.list
logMessage "Creating /boot/grub/menu.lst"
mkdir -p ${prefix}/boot/grub
cat > ${prefix}/boot/grub/menu.lst << EOF
# WARNING : Don't forget to update this when you upgrade kernel !

View File

@ -29,6 +29,7 @@ chroot ${prefix} ln -s /sbin/MAKEDEV /dev/MAKEDEV
chroot ${prefix} /sbin/MAKEDEV sda sdb sdc sdd
# Create fstab
logMessage Create /etc/fstab
cat > ${prefix}/etc/fstab << EOF
# /etc/fstab: static file system information.
#
@ -52,8 +53,10 @@ chroot ${prefix} yum clean expire-cache
chroot ${prefix} yum -y install kernel-xen grub.x86_64 perl.x86_64
KERNELVERSION=`ls ${prefix}/boot/vmlinuz-* | sed "s#$prefix/boot/vmlinuz-##"`
logMessage "Kernel $KERNELVERSION found"
# Create grub's menu.list
logMessage "Creating /boot/grub/menu.lst"
mkdir -p ${prefix}/boot/grub
cat > ${prefix}/boot/grub/menu.lst << EOF
# WARNING : Don't forget to update this when you upgrade kernel !