diskimage-builder/elements/dib-run-parts
Antoine Musso 33cd0fb40f dib-run-parts: make cp to target root more robust
The dib-run-parts/root.d/90-base-dib-run-parts script would mysteriously
fail whenever the dib-run-parts is not in the path.  The install
commands complaining with:

install: missing destination file operand after
'/tmp/image.ILFTBYVy/mnt/usr/local/bin/dib-run-parts'

The reason is chaining a command in exec bypasses set -e. For example:

 exec /bin/ls $(which doesnotexist)

Will works and continue.

Handle the which lookup in a variable to have the script abort
immediately whenever dib-run-parts is not found.

Left an inline comment to make sure the fix is kept around in the
future.

Signed-off-by: Dan Duvall <dduvall@wikimedia.org>
Change-Id: Ibb5d7342b0d06483b84f9dd567e1cc0bf90f194e
2016-04-05 16:29:57 +02:00
..
root.d dib-run-parts: make cp to target root more robust 2016-04-05 16:29:57 +02:00