Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 593683 Details for
Bug 788678
mkdumprd doesn't detect /var mounted on separate partion and kdump kernel fails
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed Patch
bz788678.diff (text/plain), 4.96 KB, created by
Cong Wang
on 2012-06-22 10:27:58 UTC
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Cong Wang
Created:
2012-06-22 10:27:58 UTC
Size:
4.96 KB
patch
obsolete
>Date: Fri, 22 Jun 2012 17:51:20 +0800 >Subject: [PATCH] Fix Bug 788678 > >--- > mkdumprd | 43 +++++++++++++++++++++++++++++++------------ > 1 files changed, 31 insertions(+), 12 deletions(-) > >diff --git a/mkdumprd b/mkdumprd >index 395822c..eec1196 100644 >--- a/mkdumprd >+++ b/mkdumprd >@@ -75,6 +75,7 @@ bin="" > KDUMP_POST="" > extra_kdump_mods="" > DUMP_FSTYPE="" >+DUMP_TARGET="" > > error() > { >@@ -1272,7 +1273,8 @@ if [ -n "$KDUMP_CONFIG_FILE" ]; then > continue > fi > USING_METHOD="filesystem" >- DUMP_FSTYPE=$config_opt >+ DUMP_FSTYPE="$config_opt" >+ DUMP_TARGET="$config_val" > if [ "$config_opt" == "ext4" ] > then > findmodule ext4 >@@ -1317,6 +1319,23 @@ handle_default_action() > esac > } > >+# if no method was specified default to the currently booted filesystem >+if [ -z "$USING_METHOD" ] >+then >+ mkdir -p $SAVE_PATH >+ mntpoint=`df $SAVE_PATH | tail -1 | awk '{ print $NF }'` >+ DUMP_TARGET=`mount | awk '$3 == "'$mntpoint'" { print $1 }'` >+ DUMP_UUID=$(blkid -s UUID $DUMP_TARGET|cut -d ' ' -f2|tr -d '\042') >+ [[ "$DUMP_UUID" =~ "UUID=" ]] && DUMP_TARGET="$DUMP_UUID" >+ DUMP_FSTYPE=`mount | awk '$3 == "'$mntpoint'" { print $5 }'` >+ handlelvordev $DUMP_TARGET 0 >+ if [ "$mntpoint" != "/" ] >+ then >+ SAVE_PATH=`echo $SAVE_PATH | sed "s,$mntpoint,,"` >+ fi >+fi >+ >+ > # If there are ISCSI devices found in dump target path, include some associated > # files and modules. > prepare_iscsi_target () { >@@ -2559,18 +2578,18 @@ if [ -n "$KDUMP_CONFIG_FILE" ]; then > ;; > *) > #test filesystem and directory creation >- if [ "$config_opt" != "xfs" ] >+ if [ "$DUMP_FSTYPE" != "xfs" ] > then >- kdump_chk "test -f /sbin/fsck.$config_opt" "Unsupported type $config_opt: fsck.$config_opt not found" >+ kdump_chk "test -f /sbin/fsck.$DUMP_FSTYPE" "Unsupported type $DUMP_FSTYPE: fsck.$DUMP_FSTYPE not found" > fi >- if [ "$config_opt" == "ext4" ] >+ if [ "$DUMP_FSTYPE" == "ext4" ] > then > # rhel5 busybox lacks fsck.ext4 support so we need to pull it in > bin="$bin /sbin/fsck.ext4" > fi > > tmnt=`mktemp -dq` >- kdump_chk "mount -t $config_opt $config_val $tmnt" "Bad mount point $config_val" >+ kdump_chk "mount -t $DUMP_FSTYPE $DUMP_TARGET $tmnt" "Bad mount point $DUMP_TARGET" > mkdir -p $tmnt/$SAVE_PATH > tdir=`mktemp -dqp $tmnt/$SAVE_PATH` > rc=$? >@@ -2584,13 +2603,13 @@ if [ -n "$KDUMP_CONFIG_FILE" ]; then > fi > rm -rf $tmnt > if [ $rc != "0" ]; then >- echo "Cannot create directory in $config_val: $SAVE_PATH" >+ echo "Cannot create directory in $DUMP_TARGET: $SAVE_PATH" > cleanup_and_exit 1 > fi > #check for available size is greater than $memtotal > if [ $available_size -lt $memtotal ]; then > echo "Warning: There is not enough space to save a vmcore." >- echo " The size of $config_val should be much greater than $memtotal kilo bytes." >+ echo " The size of $DUMP_TARGET should be much greater than $memtotal kilo bytes." > fi > > >@@ -2611,20 +2630,20 @@ if [ -n "$KDUMP_CONFIG_FILE" ]; then > if [ -z "$CORE_COLLECTOR" ]; then > CORE_COLLECTOR="cp" > fi >- emit "echo Saving to the local filesystem $config_val" >- emit "DUMPDEV=$config_val" >+ emit "echo Saving to the local filesystem $DUMP_TARGET" >+ emit "DUMPDEV=$DUMP_TARGET" > emit "IS_LABEL=\`echo \$DUMPDEV | grep LABEL\`" > emit "IS_UUID=\`echo \$DUMPDEV | grep UUID\`" > emit "if [ -n \"\$IS_LABEL\" -o -n \"\$IS_UUID\" ] " > emit "then" > emit " DUMPDEV=\`findfs \"\$DUMPDEV\"\`" > emit "fi" >- if [ "$config_opt" = "xfs" ] ; then >+ if [ "$DUMP_FSTYPE" = "xfs" ] ; then > emit "# xfs does not need fsck" > else >- emit "fsck.$config_opt -y \$DUMPDEV" >+ emit "fsck.$DUMP_FSTYPE -y \$DUMPDEV" > fi >- emit "mount -t $config_opt \$DUMPDEV /mnt" >+ emit "mount -t $DUMP_FSTYPE \$DUMPDEV /mnt" > emit "if [ \$? == 0 ]" > emit "then" > emit " mkdir -p /mnt/$SAVE_PATH/127.0.0.1-\$DATE" >-- >1.7.7.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 788678
:
593644
|
593683
|
594107
|
594144