[Bug 305281] Re: log_to_console() function breaks when /proc is missing

Steve Langasek steve.langasek at canonical.com
Wed May 15 08:19:52 UTC 2013


the log_to_console() function was dropped some time ago; marking this
bug as resolved.

** Changed in: lsb (Ubuntu)
       Status: New => Fix Released

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

Title:
  log_to_console() function breaks when /proc is missing

Status in “lsb” package in Ubuntu:
  Fix Released

Bug description:
  Binary package hint: lsb-base

  This report concerns the /etc/lsb-base-logging.sh file, in lsb-base
  3.2-14ubuntu2 in Intrepid.

  The log_to_console() function in this file breaks when there is no
  /proc filesystem, and "set -e" is in effect. (Note how it does
  "readlink /proc/self/fd/0", without bothering to check that /proc/self
  exists.)

  Why would /proc be missing, you ask? In my case, I am debconf-
  configuring the console-setup package inside a freshly-unpacked chroot
  Ubuntu system: "chroot /target /usr/sbin/dpkg-reconfigure console-
  setup". The debconf script invokes the init.d script, and the init.d
  script uses "set -e", with the end result that the dpkg-reconfigure
  procedure exits with an error.

  (One could argue the point that "you should mount a copy of procfs
  under /target/proc before running dpkg-reconfigure," but the shell
  function's use of /proc is not particularly critical. I think it is
  reasonable for the function to be able to work without /proc, and
  presume that stdin != /dev/null in that case.)

  I am attaching a trivial patch that fixes this issue.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lsb/+bug/305281/+subscriptions




More information about the foundations-bugs mailing list