We do not use bashizms any longer, so we can switch to 'sh'. Also, use
strict sh options.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-#!/bin/bash
+#!/bin/sh -euf
#
# This script inserts NAND simulator module to emulate NAND flash of specified
[ -z "$fourth" ] || fourth="fourth_id_byte=$fourth"
modprobe nandsim "$first" "$second" $third $fourth
-if [ "$?" != "0" ]; then
- fatal "Error: cannot load nandsim"
-fi
echo "Loaded NAND simulator (${size}MiB, ${eb_size}KiB eraseblock, $page_size bytes NAND page)"