Bug#584520: initramfs-tools: copy_exec hook function may exit with a non-zero return value in non-verbose mode
Package: initramfs-tools
Version: 0.95.1
Severity: normal
Tags: patch
copy_exec hook function may exit with a non-zero return value in non-verbose
mode
The copy_exec hook function could exit with a return value of 1 in non-verbose
mode. This happens due to the last command being
[ "${verbose}" = "y" ] && echo "Adding library ${x}"
whose return value will be used as the return value for the function. This
makes hook scripts with a 'set -e' statement abort after the call (see bug
#578065).
I've attached a trivial patch which fixes the problem.
Kernel: Linux 2.6.34 (PREEMPT)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages initramfs-tools depends on:
ii cpio 2.11-4 GNU cpio -- a program to manage ar
ii findutils 4.4.2-1 utilities for finding files--find,
ii klibc-utils 1.5.18-1 small utilities built with klibc f
ii module-init-tools 3.12~pre2-3 tools for managing Linux kernel mo
ii udev 154-1 /dev/ and hotplug management daemo
Versions of packages initramfs-tools recommends:
pn busybox | busybox-initramfs <none> (no description available)
Bug#584520: initramfs-tools: copy_exec hook function may exit with a non-zero return value in non-verbose mode
tags 584520 + fixed pending
thanks
* Gerrit Keller <gerrit.keller@gmail.com> [Fre Jun 04, 2010 at 11:23:21 +0200]:
> copy_exec hook function may exit with a non-zero return value in non-verbose
> mode
> The copy_exec hook function could exit with a return value of 1 in non-verbose
> mode. This happens due to the last command being
> [ "${verbose}" = "y" ] && echo "Adding library ${x}"
> whose return value will be used as the return value for the function. This
> makes hook scripts with a 'set -e' statement abort after the call (see bug
> #578065).
> I've attached a trivial patch which fixes the problem.
Good catch, thanks. Applied and will be uploaded soon.