summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcraig <craig@haquarter.de>2009-09-26 04:29:08 +0200
committercraig <craig@haquarter.de>2009-09-26 04:29:08 +0200
commit18d9c84402485112cd82482fe9b41e171e4140c0 (patch)
treedaec0648a65bfa1f1c33d70aba2cffe6f51c83a4
parentMerge branch 'master' of git://git.wolf31o2.org/projs/genkernel (diff)
parentupdating the changelog is good k (diff)
downloadgenkernel-18d9c84402485112cd82482fe9b41e171e4140c0.tar.gz
genkernel-18d9c84402485112cd82482fe9b41e171e4140c0.tar.bz2
genkernel-18d9c84402485112cd82482fe9b41e171e4140c0.zip
Merge branch 'master' of git://git.wolf31o2.org/projs/genkernel
-rw-r--r--ChangeLog19
-rwxr-xr-xdefaults/initrd.scripts31
-rwxr-xr-xdefaults/linuxrc6
-rwxr-xr-xgen_initramfs.sh10
-rwxr-xr-xgenkernel2
-rw-r--r--genkernel.conf2
6 files changed, 57 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 1e16904..43d2c11 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,25 @@
# Distributed under the GPL v2
# $Id$
+ 22 Sep 2009; <tsunam@gentoo.org> ChangeLog:
+ modified the libaio search so it'll actually work, cause I'm a dork
+
+ 21 Sep 2009; <tsunam@gentoo.org> gen_initramfs.sh:
+ Fix broken libraries for multipath per Gentoo bug #284592
+
+ 21 Sep 2009; <tsunam@gentoo.org> gen_initramfs.sh:
+ Update to fix broken initramfs caused by multipath config in Gentoo bug #284589
+
+ 05 Sep 2009; Andrew Gaffney <agaffney@gentoo.org> defaults/initrd.scripts,
+ defaults/linuxrc:
+ Apply patch from Gentoo bug #220913 for tuxonice resume
+
+ 14 Aug 2009; Andrew Gaffney <agaffney@gentoo.org> genkernel.conf:
+ Enable DISKLABEL=yes by default
+
+ 05 Aug 2009; Andrew Gaffney <agaffney@gentoo.org> genkernel:
+ This is genkernel 3.4.10.906
+
25 Jul 2009; Chris Gianelloni <wolf31o2@wolf31o2.org> genkernel.conf,
.gitattributes:
Adding Id header and Ident for genkernel.conf
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index a3478af..76c5c9b 100755
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -867,24 +867,30 @@ rundebugshell() {
fi
}
+do_resume() {
+ if [ -d /proc/suspend2 -o -d /sys/power/suspend2 -o -d /sys/power/tuxonice ]; then
+ tuxonice_resume
+ else
+ swsusp_resume
+ fi
+}
+
swsusp_resume() {
# determine swap resume partition
local device=$(ls -lL "${REAL_RESUME}" | sed 's/\ */ /g' | cut -d \ -f 5-6 | sed 's/,\ */:/')
[ -f /sys/power/resume ] && echo "${device}" > /sys/power/resume
- return 0
}
tuxonice_resume() {
- [ -d /proc/suspend2 -o -d /sys/power/suspend2 -o -d /sys/power/tuxonice ] || return
-
local splash_theme
-
if grep "splash=" /proc/cmdline > /dev/null 2>&1; then
splash_theme=$(cat /proc/cmdline | sed 's/.*splash=/splash=/' | sed 's/ .*//' | sed 's/.*theme://' | sed 's/,.*//')
fi
local tuxonice_userui_program="/sys/power/tuxonice/user_interface/program"
local tuxonice_do_resume="/sys/power/tuxonice/do_resume"
+ local tuxonice_resumedev="/sys/power/tuxonice/resume"
+ local tuxonice_replace_swsusp="/sys/power/tuxonice/replace_swsusp"
#
# Backward compatibility
@@ -892,13 +898,27 @@ tuxonice_resume() {
if [ -e /sys/power/suspend2 ]; then
tuxonice_userui_program="/sys/power/suspend2/user_interface/program"
tuxonice_do_resume="/sys/power/suspend2/do_resume"
+ tuxonice_resumedev="/sys/power/suspend2/resume"
+ tuxonice_replace_swsusp="/sys/power/suspend2/replace_swsusp"
elif [ -e /proc/suspend2 ]; then
tuxonice_userui_program="/proc/suspend2/userui_program"
tuxonice_do_resume="/proc/suspend2/do_resume"
+ tuxonice_resumedev="/proc/suspend2/resume"
+ tuxonice_replace_swsusp="/proc/suspend2/replace_swsusp"
+ fi
+
+ # if 'use_swsusp' is given, use swsusp instead
+ if grep "use_swsusp" /proc/cmdline > /dev/null 2>&1; then
+ echo 0 > ${tuxonice_replace_swsusp}
+ swsusp_resume
+ return
fi
modules_scan tuxonice
+ # we both configure tuxonice and activate resuming,
+ # however the kernel will resume only if an image is found
+
if ! grep suspend_noui /proc/cmdline > /dev/null 2>&1; then
which suspend2ui_text > /dev/null 2>&1 && which suspend2ui_text > "${tuxonice_userui_program}"
which tuxoniceui_text > /dev/null 2>&1 && which tuxoniceui_text > "${tuxonice_userui_program}"
@@ -911,8 +931,9 @@ tuxonice_resume() {
which tuxoniceui_fbsplash > /dev/null 2>&1 && which tuxoniceui_fbsplash > "${tuxonice_userui_program}"
fi
- echo > "${tuxonice_do_resume}"
fi
+ echo "${REAL_RESUME}" > "${tuxonice_resumedev}"
+ echo > "${tuxonice_do_resume}"
}
find_loop() {
diff --git a/defaults/linuxrc b/defaults/linuxrc
index c3d5239..d50d95a 100755
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -178,7 +178,7 @@ do
swap_keydev\=*)
CRYPT_SWAP_KEYDEV=`parse_opt "${x}"`
;;
- real_resume\=*)
+ real_resume\=*|resume\=*)
REAL_RESUME=`parse_opt "${x}"`
;;
noresume)
@@ -313,9 +313,7 @@ then
;;
esac
- swsusp_resume
-# suspend_resume
- tuxonice_resume
+ do_resume
fi
fi
diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index 9f66b71..30731a4 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -138,12 +138,18 @@ append_multipath(){
mkdir -p "${TEMP}/initramfs-multipath-temp/lib/"
# Copy files to /lib
- for i in /lib/{ld-*,libc-*,libc.*,libdl-*,libdl.*,libsysfs*so*,libdevmapper*so*}
+ for i in /lib/{ld-*,libc-*,libc.*,libdl-*,libdl.*,libsysfs*so*,libdevmapper*so*,libpthread*,librt*,libreadline*,libncurses*}
do
cp -a "${i}" "${TEMP}/initramfs-multipath-temp/lib" \
|| gen_die "Could not copy file ${i} for MULTIPATH"
done
+ for i in /usr/lib/libaio*
+ do
+ cp -a "${i}" "${TEMP}/initramfs-multipath-temp/lib" \
+ || gen_die "Could not copy file ${i} for MULTIPATH"
+ done
+
# Copy files to /sbin
for i in /sbin/{multipath,kpartx,mpath_prio_*,devmap_name,dmsetup} /lib64/udev/scsi_id
do
@@ -166,7 +172,7 @@ append_multipath(){
then
cp /etc/scsi_id.config "${TEMP}/initramfs-multipath-temp/etc/" || gen_die 'could not copy scsi_id.config'
fi
- cd "${TEMP/initramfs-multipath-temp/}"
+ cd "${TEMP}/initramfs-multipath-temp"
find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
rm -r "${TEMP}/initramfs-multipath-temp/"
}
diff --git a/genkernel b/genkernel
index ef925a6..767fe53 100755
--- a/genkernel
+++ b/genkernel
@@ -2,7 +2,7 @@
# $Id$
PATH="${PATH}:/sbin:/usr/sbin"
-GK_V='3.4.10.905'
+GK_V='3.4.10.906'
# Set the default for TMPDIR. May be modified by genkernel.conf or the
# --tempdir command line option.
diff --git a/genkernel.conf b/genkernel.conf
index 240d613..ecf917c 100644
--- a/genkernel.conf
+++ b/genkernel.conf
@@ -78,7 +78,7 @@ USECOLOR="yes"
# FIRMWARE_FILES=""
# Enable disklabel support (copies blkid to initrd)
-# DISKLABEL="yes"
+DISKLABEL="yes"
# Add new kernel to grub?
# BOOTLOADER="grub"