From bda76debeeb27c938ff9cab86de793981fc18c35 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 18 Aug 2013 14:31:40 +0200 Subject: [PATCH] initrd.scripts: kill tuxonice support with a LOT of fire tuxonice is almost dead. Last update was in 2011 and they're now trying to resurrect this ugly and non-upstream friendly thing. Moreover, the tuxonice genkernel code is the ugliest thing I have ever seen in it. Well no, unionfs was even worse. So please, let's forget about tuxonice for now and focus on the good looking code. I am willing to accept patches that restore tuxonice support if they're good quality ones. Burn tuxonice init code, burn in hell. --- defaults/initrd.scripts | 65 +---------------------------------------- doc/genkernel.8.txt | 2 +- 2 files changed, 2 insertions(+), 65 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index ab0eaf5..916a5e0 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -1435,15 +1435,7 @@ resume_init() { bad_msg "Something bad may happen, crossing fingers" fi - do_resume -} - -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 } swsusp_resume() { @@ -1453,61 +1445,6 @@ swsusp_resume() { echo "${device}" > /sys/power/resume } -tuxonice_resume() { - 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 - # - 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}" - - if [ -n "${splash_theme}" ]; then - ln -s /etc/splash/${splash_theme} /etc/splash/suspend2 - ln -s /etc/splash/${splash_theme} /etc/splash/tuxonice - - which suspend2ui_fbsplash > /dev/null 2>&1 && which suspend2ui_fbsplash > "${tuxonice_userui_program}" - which tuxoniceui_fbsplash > /dev/null 2>&1 && which tuxoniceui_fbsplash > "${tuxonice_userui_program}" - fi - - fi - echo "${REAL_RESUME}" > "${tuxonice_resumedev}" - echo > "${tuxonice_do_resume}" -} - find_loop() { for loop in ${LOOPS} do diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt index 2b700a8..78bba08 100644 --- a/doc/genkernel.8.txt +++ b/doc/genkernel.8.txt @@ -558,7 +558,7 @@ which the ramdisk scripts would recognize. *noresume*:: *noresume* disables any default resume parameters. *resume* and *real_resume* specify a device via LABEL or UUID to use for for loading a - TuxOnICE, SWSUSP or Suspend2 resume image. + SWSUSP resume image. *cdroot*[=<...>]:: *cdroot_type*=<...>::