[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#586554: update-initramfs fails to generate initrd.img-2.6.32-5-686 in Debian testing when upgrading from 0.96 to 0.97



On 07/03/2010 10:24 AM, Brendon Higgins wrote:
Hi Alesh,

Alesh Slovak wrote (Thursday 01 July 2010):
If the very last file that iscan's hook script checks for in DESTDIR
doesn't exist, the `test -e` call fails and the script ends with a failed
status even though nothing really went wrong. A simple `exit 0` on the
last line fixes this.

It's actually not that simple. Running the iscan hook script with "set -e"
means that the script will abort with an error status as soon as the "test -e"
fails for any file in the clean-files list. Adding "exit 0" at the end of the
script won't fix that, because the script will never reach that point anyway.

I had thought the same at first, but according to the bash man page, the `-e` option "exits immediately if any *untested* command fails". A similar statement exists in the dash man page as well.

The "test -e" command is protected by an "&&", so a failure will not trigger an early exit and all files will be correctly removed.


Happy scanning,
--
Alesh Slovak                    Linux Team -- AVASYS Corporation
alesh.slovak@avasys.jp          http://avasys.jp



Reply to: