diff options
author | Darren Hart <dvhart@linux.intel.com> | 2014-06-23 14:44:41 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-06-24 19:54:11 +0100 |
commit | d3408652849cd62f8e95757b92d755e8931c7d2c (patch) | |
tree | 433656669d05af4264fd73343f5a99c88ad8145a | |
parent | 1f0817c276094753c664ed7717cbcc3765fe39bb (diff) | |
download | poky-d3408652849cd62f8e95757b92d755e8931c7d2c.tar.gz |
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>
-rwxr-xr-x | scripts/contrib/mkefidisk.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh index c86849d395..1992d6c6cb 100755 --- a/scripts/contrib/mkefidisk.sh +++ b/scripts/contrib/mkefidisk.sh | |||
@@ -98,6 +98,11 @@ DEVICE=$1 | |||
98 | HDDIMG=$2 | 98 | HDDIMG=$2 |
99 | TARGET_DEVICE=$3 | 99 | TARGET_DEVICE=$3 |
100 | 100 | ||
101 | LINK=$(readlink $DEVICE) | ||
102 | if [ $? -eq 0 ]; then | ||
103 | DEVICE="$LINK" | ||
104 | fi | ||
105 | |||
101 | if [ ! -w "$DEVICE" ]; then | 106 | if [ ! -w "$DEVICE" ]; then |
102 | echo "ERROR: Device $DEVICE does not exist or is not writable" | 107 | echo "ERROR: Device $DEVICE does not exist or is not writable" |
103 | usage | 108 | usage |