avoid failure if /lib/firmware doesn't exist

On Debian, /lib/firmware is provided by optional packages like
firmware-iwlwifi or firmware-linux-free. That's why this directory
may not exist.
This change ensure the directory exist before trying to copy it
content.

Change-Id: Icf9eedf4148141c92e9171f16ae744b88a8d8519
This commit is contained in:
Gonéri Le Bouder 2014-06-14 00:05:27 +02:00
parent 20cb5927d2
commit 131fb8c216

View File

@ -176,7 +176,9 @@ function populate_lib () {
cp -a "$MODULE_DIR" "$TMP_MOUNT_PATH/lib/modules/$KERNEL_VERSION"
echo "Removing kernel framebuffer drivers to enforce text mode consoles..."
find $TMP_MOUNT_PATH/lib/modules/$KERNEL_VERSION/kernel/drivers/video -name '*fb.ko' -exec rm -v {} \;
if [ -d $FIRMWARE_DIR ]; then
cp -a "$FIRMWARE_DIR" "$TMP_MOUNT_PATH/lib/firmware"
fi
}
function busybox_list () {