mkefidisk.sh: Allow symlink for device
Allow the user to specify a symlink as the host device. If a link is used, mkefidisk will now dereference it and use the link target when looking for sysfs information. (From OE-Core rev: 67bbfac55555c4e35ed9a84409aedb9b278b3de9) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
1f0817c276
commit
d340865284
|
@ -98,6 +98,11 @@ DEVICE=$1
|
|||
HDDIMG=$2
|
||||
TARGET_DEVICE=$3
|
||||
|
||||
LINK=$(readlink $DEVICE)
|
||||
if [ $? -eq 0 ]; then
|
||||
DEVICE="$LINK"
|
||||
fi
|
||||
|
||||
if [ ! -w "$DEVICE" ]; then
|
||||
echo "ERROR: Device $DEVICE does not exist or is not writable"
|
||||
usage
|
||||
|
|
Loading…
Reference in New Issue