Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 98549 Details for
Bug 146352
sys-power/hibernate-script: errors in /sbin/functions.sh after resume
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
modules_gentoo.dash-compatible.patch
modules_gentoo.dash-compatible.patch (text/plain), 2.72 KB, created by
Alexander Skwar
on 2006-10-01 13:12:54 UTC
(
hide
)
Description:
modules_gentoo.dash-compatible.patch
Filename:
MIME Type:
Creator:
Alexander Skwar
Created:
2006-10-01 13:12:54 UTC
Size:
2.72 KB
patch
obsolete
>--- hibernate-script-1.93/scriptlets.d/modules_gentoo 2006-07-12 12:15:51.000000000 +0200 >+++ /usr/share/hibernate/scriptlets.d/modules_gentoo 2006-10-01 21:51:40.000000000 +0200 >@@ -4,15 +4,60 @@ > AddConfigHandler GentooModulesOptions > AddConfigHelp "GentooModulesAutoload <boolean>" "Try to load default modules after resuming (from /etc/modules.autoload)" > >-GentooModulesAutoload() { >- [ x"$MODULES_GENTOO_AUTOLOAD" = "x1" ] || return 0 >+# Necessary helpers to parse/work with /etc/modules.autoload.d/kernel-2.? >+KV_major() { >+ test -z "$1" && return 1 >+ >+ local KV="$@" >+ echo "${KV%%.*}" >+} >+ >+KV_minor() { >+ test -z "$1" && return 1 >+ >+ local KV="$@" >+ KV="${KV#*.}" >+ echo "${KV%%.*}" >+} >+ >+KV_micro() { >+ test -z "$1" && return 1 >+ >+ local KV="$@" >+ KV="${KV#*.*.}" >+ r=`echo "$KV" | sed -n 's/^\([0-9]\+\)[^0-9].*$/\1/p'` >+ #vecho 1 "in KV_micro KV=$KV r=$r @=" "$@" " ................" >+ echo $r >+} >+ >+get_KV() { >+ test -z "${_RC_GET_KV_CACHE}" && _RC_GET_KV_CACHE=`uname -r` >+ >+ echo "$(KV_to_int "${_RC_GET_KV_CACHE}")" > >- if [ ! -f /sbin/functions.sh ] ; then >- vecho 1 "/sbin/functions.sh not found - not running Gentoo? gentoo-modules disabled." >- return 1 >+ return $? >+} >+ >+KV_to_int() { >+ test -z "$1" && return 1 >+ >+ local KV_int=$(( `KV_major "$1"` * 65536 + `KV_minor "$1"` * 256 )) >+ KV_int=$(( `KV_micro "$1"` + $KV_int )) >+ >+ # We make version 2.2.0 the minimum version we will handle as >+ # a sanity check ... if its less, we fail ... >+ >+ if [ $KV_int -ge 131584 ]; then >+ echo "${KV_int}" >+ return 0 > fi > >- . /sbin/functions.sh >+ return 1 >+} >+ >+GentooModulesAutoload() { >+ test "$MODULES_GENTOO_AUTOLOAD" = "1" || return 0 >+ > # taken from gentoo's /etc/init.d/modules > if [ -f /etc/modules.autoload ] && [ ! -L /etc/modules.autoload ] ; then > modules_autoload_file= /etc/modules.autoload >@@ -22,12 +67,10 @@ > local KV_MINOR="`KV_minor "${KV}"`" > > # New support for /etc/modules.autoload/kernel-$KV >- if [ "$(get_KV)" -ge "$(KV_to_int '2.5.48')" ] && \ >- [ -f /etc/modules.autoload.d/kernel-"${KV_MAJOR}.${KV_MINOR}" ] >- then >+ if [ "$( get_KV )" -ge "$( KV_to_int '2.5.48' )" ] && \ >+ [ -f /etc/modules.autoload.d/kernel-"${KV_MAJOR}.${KV_MINOR}" ] ; then > modules_autoload_file="/etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}" >- elif [ ! -f /etc/modules.autoload.d/kernel-"${KV_MAJOR}.${KV_MINOR}" ] >- then >+ elif [ ! -f /etc/modules.autoload.d/kernel-"${KV_MAJOR}.${KV_MINOR}" ] ; then > ewarn "Missing /etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}" > modules_autoload_file="/etc/modules.autoload.d/kernel-2.4" > else >@@ -52,7 +95,6 @@ > return 0 > } > >- > GentooModulesOptions() { > case $1 in > gentoomodulesautoload)
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 146352
:
96094
|
97366
|
98150
|
98549
|
98554