Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

Resolve symlink for device #222

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bin/coreos-install
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,11 @@ if [[ -z "${DEVICE}" ]]; then
exit 1
fi

# Symlink may cause trouble with lsblk and blkid
if [[ -L "${DEVICE}" ]]; then
DEVICE=$(readlink -f "${DEVICE}")
fi

if ! [[ $(lsblk -n -d -o TYPE "${DEVICE}") =~ ^(disk|loop|lvm)$ ]]; then
echo "$0: Target block device (${DEVICE}) is not a full disk." >&2
exit 1
Expand Down