Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates > by-pkgid > 07836eb1c510f628a114712c4dae3542 > files > 3

kexec-tools-2.0.0-37.fc13.i686.rpm

#!/bin/sh

###################################################
# Start by setting up the console to work as a user
# expects
###################################################
exec >/dev/console 2>&1
export TERM=linux
export PS1='initramfs-test:\w\$ '
stty sane


##################################################
# Start udev up
##################################################
start_udev

##################################################
# Load all the modules based on 
# /etc/module_load_list
##################################################
load_modules

##################################################
# Assemble any existing lvm arrays
##################################################
assemble_lvm_array


##################################################
# Assemble any mdraid partitions that might exist
##################################################
#TODO - FILL ME IN


##################################################
# Mount the root file system
# Note that the sample manifest modified
# The /etc/fstab file to put the root file system
# under /mnt directly
##################################################
mount /mnt
if [ $? -ne 0]
	echo "Failed to mount root fs for dump capture. rebooting"
	reboot -f
fi


##################################################
# Now capture the core dump to the target fs
# Note we need to set the date here
##################################################
if [ -f /etc/clock ]
then
	. /etc/clock
fi
if [ "$UTC" == "true" ]
then
	TIME_FORMAT=-u
else
	TIME_FORMAT=-l
fi
hwclock --hctosys $TIME_FORMAT

DATE=`date +%Y-%m-%d-%T`

cp /proc/vmcore /mnt/var/crash/$DATE/vmcore
 
##################################################
# Reboot the system to get back to production
##################################################
reboot -f