kdump.sh cleanup for fstab handling
This commit is contained in:
parent
2630148dc7
commit
8a14c620b7
@ -25,16 +25,15 @@ add_dump_code()
|
||||
fi
|
||||
}
|
||||
|
||||
add_to_fstab()
|
||||
get_mp()
|
||||
{
|
||||
local _mp
|
||||
while read dev mp fs opts rest; do
|
||||
if [ "$dev" = "$1" ]; then
|
||||
_mp=$NEWROOT$mp
|
||||
echo "$dev $NEWROOT$mp $fs ${opts},rw $rest"
|
||||
_mp="$mp"
|
||||
break
|
||||
fi
|
||||
done < "$NEWROOT/etc/fstab" >> /etc/fstab
|
||||
done < /proc/mounts
|
||||
echo "$_mp"
|
||||
}
|
||||
|
||||
@ -56,12 +55,10 @@ to_dev_name()
|
||||
dump_localfs()
|
||||
{
|
||||
local _dev=`to_dev_name $1`
|
||||
local _mp=`add_to_fstab $_dev`
|
||||
if [ $_mp = "$NEWROOT/" ] || [ $_mp = "$NEWROOT" ]
|
||||
local _mp=`get_mp $_dev`
|
||||
if [ "$_mp" = "$NEWROOT/" ] || [ "$_mp" = "$NEWROOT" ]
|
||||
then
|
||||
mount -o remount,rw $_mp || return 1
|
||||
else
|
||||
mount $_mp || return 1
|
||||
fi
|
||||
mkdir -p $_mp/$KDUMP_PATH/$DATEDIR
|
||||
$CORE_COLLECTOR /proc/vmcore $_mp/$KDUMP_PATH/$DATEDIR/vmcore || return 1
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: kexec-tools
|
||||
Version: 2.0.3
|
||||
Release: 33%{?dist}
|
||||
Release: 34%{?dist}
|
||||
License: GPLv2
|
||||
Group: Applications/System
|
||||
Summary: The kexec/kdump userspace component.
|
||||
@ -289,6 +289,9 @@ done
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jan 25 2012 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-34
|
||||
- kdump.sh cleanup for fstab handling, from Dave Young.
|
||||
|
||||
* Wed Jan 25 2012 Cong Wang <xiyou.wangcong@gmail.com> - 2.0.2-33
|
||||
- Handle rootfs correctly.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user