From 68ffe4036df5c216a24ce8c6cebbbf41fca28c0b Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 4 Oct 2022 15:00:00 +0200 Subject: [PATCH] flatcar-install: Use long flags in lsblk invocations These might communicate their purpose more effectively than their one-letter counterparts. --- bin/flatcar-install | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/flatcar-install b/bin/flatcar-install index 572009f..884a953 100755 --- a/bin/flatcar-install +++ b/bin/flatcar-install @@ -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}') @@ -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%/}" ;;