Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 105096 Details for
Bug 159643
Baselayout support for enabling and saving kernel's core dumps
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
localmount patch
localmount-fbsd-core.patch (text/plain), 1.63 KB, created by
Diego Elio Pettenò (RETIRED)
on 2007-01-01 13:24:45 UTC
(
hide
)
Description:
localmount patch
Filename:
MIME Type:
Creator:
Diego Elio Pettenò (RETIRED)
Created:
2007-01-01 13:24:45 UTC
Size:
1.63 KB
patch
obsolete
>--- baselayout-1.13.0_alpha10/init.d/localmount 2006-12-19 17:03:18 +0100 >+++ /etc/init.d/localmount 2007-01-01 23:57:41 +0100 >@@ -55,12 +55,47 @@ > fi > fi > >+ # Now that we have the filesystems mount in R/W mode, save the FreeBSD >+ # core file if present; this needs to be done before enabling swap, or >+ # the core will be lost for good >+ freebsd_savecore() { >+ [[ $(uname) != "FreeBSD" ]] && return 0 >+ >+ local dumpdir=${KERNEL_DUMP_DIR:-/var/crash} >+ if ! [[ -d "${dumpdir}" ]]; then >+ mkdir -p "${dumpdir}" >+ chmod 700 "${dumpdir}" >+ fi >+ >+ # Don't quote ${KERNEL_DUMP_DEVICE}, so that if it's unset, savecore >+ # will check on the partitions listed in fstab without errors in the >+ # output >+ savecore -C "${dumpdir}" ${KERNEL_DUMP_DEVICE} >/dev/null || return 0 >+ >+ local savecoreopts="${dumpdir} ${KERNEL_DUMP_DEVICE}" >+ [[ ${KERNEL_DUMP_COMPRESS} == "yes" ]] && savecoreopts="-z ${savecoreopts}" >+ >+ ebegin $"Saving kernel core dump" >+ savecore ${savecoreopts} >/dev/null >+ eend $? >+ } >+ >+ freebsd_savecore >+ > # We do our swapping here instead of rc so we can get urandom started > # before us for people that like an encrypted swap. > ebegin $"Activating (possible) swap" > swapon -a >/dev/null > eend 0 # If swapon has nothing todo it errors, so always return 0 > >+ # Now that the swap devices are enabled, FreeBSD users might request to >+ # enable kernel dumps during panic, so run dumpon if needed. >+ if [[ $(uname) == "FreeBSD" ]] && [[ -n "${KERNEL_DUMP_DEVICE}" ]]; then >+ ebegin $"Activating kernel core dump device." >+ dumpon "${KERNEL_DUMP_DEVICE}" >+ eend $? >+ fi >+ > # Start dm-crypt mappings, if any > start_addon dm-crypt >
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 159643
: 105096 |
105097