[Bug 75616] Re: support suspend2 kernels in initramfs

maximilian attems maks at debian.org
Tue Jul 5 16:26:52 UTC 2011


Please ship that hook together with the ui of suspend2.

initramfs-tools is a generic initramfs generator and works out of the box for generic linux images using vanilla suspend mechanism.
thank you for your work.

** Package changed: initramfs-tools (Ubuntu) => suspend2-userui (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/75616

Title:
  support suspend2 kernels in initramfs

Status in “suspend2-userui” package in Ubuntu:
  Confirmed

Bug description:
  currently users switching to suspend2-enabled kernels need to add
  support for suspend2 into the initramfs scripts manually.  This is an
  unnecessary user intervention into sensitive miccion-critical files,
  which can be avoided by adding scripts to the initramfs-tools package
  which handle suspend2 kernels by default.  the following two scripts
  add support for suspend2 while leaving the boot process untouched in
  non-suspend2-enabled kernels.

  /usr/share/initramfs-tools/scripts/local-premount/suspend2_do_resume :

  #!/bin/sh

  PREREQ=""

  prereqs()
  {
          echo "$PREREQ"
  }

  case $1 in
  # get pre-requisites
  prereqs)
          prereqs
          exit 0
          ;;
  esac

  if [ -d /proc/suspend2 ]; then
          echo > /proc/suspend2/do_resume
  elif [ -d /sys/power/suspend2 ]; then
          echo > /sys/power/suspend2/do_resume
  fi

  
  --------------------------

  /usr/share/initramfs-tools/hooks/suspend2ui_usplash_hook :

  #!/bin/sh
  PREREQ=""

  prereqs()
  {
          echo "$PREREQ"
  }

  case $1 in
  # get pre-requisites
  prereqs)
          prereqs
          exit 0
          ;;
  esac

  . /usr/share/initramfs-tools/hook-functions

  if [ -x /usr/sbin/suspend2ui_usplash ];
  then
          mkdir --parents ${DESTDIR}/usr/bin/ 2>/dev/null || true
          copy_exec /usr/sbin/suspend2ui_usplash /usr/bin/
  fi

  ---------------------------------------

  The first script is essential, as it enables the resume from suspend.
  The second script simply integrates the suspend2 resume messages into
  usplash if the usplash-ui package is installed.

  matt

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/suspend2-userui/+bug/75616/+subscriptions




More information about the foundations-bugs mailing list