OBS User unknown
2007-03-15 00:41:29 +00:00
committed by Git OBS Bridge
parent 69d44e59e9
commit c99563c960
4 changed files with 202 additions and 10 deletions

18
kdump
View File

@@ -77,12 +77,18 @@ get_size_mb()
# and save the vmcore
save_core()
{
dumpsize=`get_mem_size`
if [ -z "$dumpsize" -o "$dumpsize" = 0 ]; then
echo -n "Null size vmcore"
rc_status -s
rc_failed 6
return
fi
if [ $KDUMP_KEEP_OLD_DUMPS -gt 0 ]; then
purge_old_dumps
fi
dumpsize=`get_mem_size`
if [ $KDUMP_FREE_DISK_SIZE -gt 0 ]; then
restsize=`parse_rest_size "$KDUMP_SAVEDIR"`
needsize=`expr $dumpsize + $KDUMP_FREE_DISK_SIZE`
@@ -241,12 +247,8 @@ is_crash_kernel ()
test -f /proc/vmcore || return 1
# FIXME: any better way to detect crash environment?
test -n "$CRASH" && return 0
case `uname -i` in
ia64)
# ia64 has no kdump kernel
return 1;;
esac
return 0
grep -q elfcorehdr= /proc/cmdline && return 0
return 1
}
# return success if we have a valid dump on the dump device