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:53:01 +0100 |
commit | 67bbfac55555c4e35ed9a84409aedb9b278b3de9 (patch) | |
tree | f8f3e84e667a236d4616291d48c0aad49fb7ad5a /scripts/contrib | |
parent | 873bdf8ba578aa91f29cd19e9b235e81f09e156c (diff) | |
download | openembedded-core-67bbfac55555c4e35ed9a84409aedb9b278b3de9.tar.gz openembedded-core-67bbfac55555c4e35ed9a84409aedb9b278b3de9.tar.bz2 openembedded-core-67bbfac55555c4e35ed9a84409aedb9b278b3de9.zip |
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.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib')
-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 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 |