~ubuntu-branches/ubuntu/wily/makedumpfile/wily

« back to all changes in this revision

Viewing changes to debian/kdump-config

  • Committer: Bazaar Package Importer
  • Author(s): John Wright
  • Date: 2011-04-26 20:05:16 UTC
  • mfrom: (1.1.4 upstream) (7.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110426200516-7dzi6nnzouzfto2f
* Cherry-pick upstream commits:
  - [PATCH] BUGFIX: Avoid SIGSEGV when specifying -V option.
    (5b8c2da75cbdb230019a3b956793fb768055b977)
  - [PATCH] Copy correct nr_cpus info to dumpfile during re-filtering.
    (c4f1c98a9827c1c0e41772c1954940fbf1b48048)
* kdump-tools.init: Don't exit with failure status except for bad
  usage.  This way, even if /etc/default/kdump-tools has USE_KDUMP=1
  but the kernel command line or debug kernels are not set up,
  installation of a new version of the package will not leave it
  unconfigured.  (Closes: #623470)

Show diffs side-by-side

added added

removed removed

Lines of Context:
191
191
                fi
192
192
 
193
193
        # 2: Look for an installed debug kernel
 
194
        elif [ -e /usr/lib/debug/boot/vmlinux-$KVER ] ; then
 
195
                DEBUG_KERNEL=/usr/lib/debug/boot/vmlinux-$KVER
 
196
                DEBUG_CONFIG=/boot/config-$KVER
 
197
                DEBUG_MAP=/boot/System.map-$KVER
194
198
        elif [ -e /usr/lib/debug/vmlinux-$KVER ] ; then
195
199
                DEBUG_KERNEL=/usr/lib/debug/vmlinux-$KVER
196
200
                DEBUG_CONFIG=/usr/lib/debug/config-$KVER
200
204
 
201
205
        # 3: give up :)
202
206
        else
203
 
                log_failure_msg "could not find an installed debug vmlinux image and"
204
 
                log_failure_msg "DEBUG_KERNEL is not specified in $KDUMP_DEFAULTS"
205
 
                log_failure_msg "Warning: makedumpfile will be limited to -d 1."
 
207
                echo "Could not find an installed debug vmlinux image and"
 
208
                echo "DEBUG_KERNEL is not specified in $KDUMP_DEFAULTS"
 
209
                log_warning_msg "makedumpfile may be limited to -d 1"
206
210
                return 1;
207
211
        fi
208
212
 
318
322
        # Assemble the --commmand-line:
319
323
        if [ -z "$KDUMP_CMDLINE" ] ; then
320
324
                KDUMP_CMDLINE=`cat /proc/cmdline | \
321
 
                sed -e 's/crashkernel=[^ $]*//' \
322
 
                    -e 's/ abm=[^ $]*//' \
323
 
                    -e 's/^abm=[^ $]*//'`
 
325
                sed -r -e 's/(^| )crashkernel=[^ ]*//g' \
 
326
                       -e 's/(^| )abm=[^ ]*//g'`
324
327
        fi
325
328
        KDUMP_CMDLINE="$KDUMP_CMDLINE $KDUMP_CMDLINE_APPEND"
326
329
        KEXEC_CMD="$KEXEC_CMD --command-line=\"$KDUMP_CMDLINE\""