Updating mkdumprd2 infrastructure
This commit is contained in:
parent
9487d3dfb1
commit
90bc3df3ad
@ -21,12 +21,51 @@ start_udev
|
||||
##################################################
|
||||
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
|
||||
##################################################
|
||||
|
@ -11,6 +11,7 @@
|
||||
# 1) reg
|
||||
# reg <source file> <dest path>
|
||||
# A regular file copy from the source to the dst directory
|
||||
#
|
||||
# 2) creg
|
||||
# creg <source file> <dest path>
|
||||
# like reg, but only copy if the source file exists
|
||||
@ -73,8 +74,14 @@ creg /etc/mdadm.conf /etc
|
||||
###################################################
|
||||
gen awk /etc/fstab '/^[^#]/{print $1 " /mnt"$2 " "$3 " "$4 " "$5 " "$6}' /etc/fstab
|
||||
|
||||
###################################################
|
||||
# Grab /etc/clock so we can set the clock properly
|
||||
###################################################
|
||||
creg /etc/clock /etc
|
||||
|
||||
###################################################
|
||||
# Grab the standard initscript to capture to the local
|
||||
# rootfs
|
||||
###################################################
|
||||
#ren /usr/share/kexec-tools/kdumpinit.rootfs /init
|
||||
#
|
||||
ren /usr/share/kexec-tools/kdumpinit.rootfs /init
|
||||
|
2
sources
2
sources
@ -1,4 +1,4 @@
|
||||
d9f2ecd3c3307905f24130a25816e6cc kexec-tools-2.0.0.tar.bz2
|
||||
3e802d638dce0080b910f15908c04a24 kexec-tools-po.tar.gz
|
||||
190f8878aa7e7b63a96fde5d59538eec makedumpfile-1.3.3.tar.gz
|
||||
f06ce57e7e4eb59dde1c986f8787c8b0 mkdumprd2-files.tbz2
|
||||
eeaf6fd69d4254ea61e42259898bc1ef mkdumprd2-files.tbz2
|
||||
|
Loading…
Reference in New Issue
Block a user