Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flatcar-install: Use long flags in lsblk invocations #82

Open
wants to merge 1 commit into
base: flatcar-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
8 changes: 5 additions & 3 deletions bin/flatcar-install
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ default_board() {
# Finds an unmounted disk with size greater than 10GB and prints it to stdout,
# otherwise prints an empty line.
find_smallest_unused_disk() {
local disks="$(lsblk -lnpdb -x SIZE -o NAME,SIZE $INCLUDE_MAJOR $EXCLUDE_MAJOR \
local disks="$(lsblk --list --noheadings --paths --nodeps --bytes --sort SIZE --output NAME,SIZE $INCLUDE_MAJOR $EXCLUDE_MAJOR \
| (
while IFS= read -r line; do
drive=$(echo "$line" | awk '{print $1}')
Expand Down Expand Up @@ -442,11 +442,13 @@ do
B) BOARD="$OPTARG" ;;
C) CHANNEL_ID="$OPTARG"; CHANNEL_SPECIFIED=1 ;;
D) DOWNLOAD_ONLY='true';;
I) INCLUDE_MAJOR="-I $OPTARG" ;;
# --include is a param for lsblk
I) INCLUDE_MAJOR="--include $OPTARG" ;;
d) DEVICE="$OPTARG" ;;
o) OEM_ID="$OPTARG" ;;
c) CLOUDINIT="$OPTARG" ;;
e) EXCLUDE_MAJOR="-e $OPTARG" ;;
# --exclude is a param for lsblk
e) EXCLUDE_MAJOR="--exclude $OPTARG" ;;
i) IGNITION="$OPTARG" ;;
t) ;; # compatibility option; previously set TMPDIR
b) BASE_URL="${OPTARG%/}" ;;
Expand Down