*** This bug is a duplicate of bug 1561643 ***
    https://bugs.launchpad.net/bugs/1561643

** This bug has been marked a duplicate of bug 1561643
   initramfs-tools ignores the FRAMEBUFFER option

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

Title:
  run_scripts_optional sets 'y' value but call_scripts checks for
  'optional' value

Status in initramfs-tools:
  New
Status in initramfs-tools package in Ubuntu:
  New

Bug description:
  I looked into my initramfs and found there big graphics modules for hardware 
which I don't have. 
  I found a place where these modules were copied into initramfs, it was in 
/usr/share/initramfs-tools/hooks/framebuffer
  Also I found a recipe on the Internet, advising to put 'FRAMEBUFFER=n' into 
initramfs.conf to exclude optional hooks and scipts which have 
OPTION=FRAMEBUFFER in them from initramfs creation
  I tried to set this option and to update my initramfs, but did not succeed
  So I examined mkinitramfs and related scripts and found this sequence in 
/usr/share/initramfs-tools/hook-functions :

  run_scripts_optional()
  {
          call_scripts_optional=y
          run_scripts "$@"
  }
  ...
  run_scripts()
  {
  ...
          call_scripts $scriptdir
  }
  ...
  call_scripts()
  {
  ...
          for cs_x in ${runlist}; do
  ...
                  if [ x"$call_scripts_optional" = "xoptional" ]; then
                          option=$(sed 
'/^OPTION=/!d;$d;s/^OPTION=//;s/[[:space:]]*$//' "${initdir}/${cs_x}")
                          [ -z "${option}" ] || eval test -n \"\${$option}\" -a 
\"\${$option}\" != \"n\" || continue
                  fi
  ...
          done
  ...
  }

  As you see, variable 'call_scripts_optional' is set to vaue 'y' in
  run_scripts_optional function, but then it is checked for having
  'optional' value in call_scripts function

  This is observed at least in up-to-date Ubuntu Xenial and Zesty
  I will also check equivalent scripts in Debian testing/unstable and report my 
finding in a comment below.

To manage notifications about this bug go to:
https://bugs.launchpad.net/initramfs-tools/+bug/1651170/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to