From: Henning Schild <henning.schild@siemens.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: isar-users <isar-users@googlegroups.com>,
"Moessbauer, Felix (T CED SES-DE)" <felix.moessbauer@siemens.com>
Subject: Re: [PATCH] expand-on-first-boot: Resolve errors in helper script
Date: Wed, 25 May 2022 10:08:51 +0200 [thread overview]
Message-ID: <20220525100851.73c5d4e7@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <644a0a94-5128-556f-ee7b-c644c46a8db5@siemens.com>
Am Tue, 24 May 2022 21:00:03 +0200
schrieb Jan Kiszka <jan.kiszka@siemens.com>:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Missing quotes broke the -n test, and as we are at it, also resolve
> the shellcheck warnings.
>
> Fixes: 15214487e19e ("expand-on-first-boot: Add support for
> devicemapper") Reported-by: Felix Moessbauer
> <felix.moessbauer@siemens.com> Signed-off-by: Jan Kiszka
> <jan.kiszka@siemens.com> ---
> .../expand-on-first-boot/files/expand-last-partition.sh | 4
> ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git
> a/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh
> b/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh
> index bb371e9f..8a8b7c98 100755 ---
> a/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh
> +++
> b/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh
> @@ -11,8 +11,8 @@ set -e ROOT_DEV="$(findmnt / -o source -n)"
> ROOT_DEV_NAME=${ROOT_DEV##*/} -ROOT_DEV_SLAVE=$(ls -d
> /sys/block/${ROOT_DEV_NAME}/slaves/* 2>/dev/null | head -1) -if [ -n
> ${ROOT_DEV_SLAVE} ]; then +ROOT_DEV_SLAVE=$(find
> /sys/block/"${ROOT_DEV_NAME}"/slaves/* 2>/dev/null | head -1)
maybe
find /sys/block/${ROOT_DEV_NAME}/slaves/ -mindepth 1 -print -quit
-mindepth 1 to loose the *
-print -quit to loose the pipe head 1
Henning
> +if [
> -n "${ROOT_DEV_SLAVE}" ]; then ROOT_DEV=/dev/${ROOT_DEV_SLAVE##*/}
> fi
>
prev parent reply other threads:[~2022-05-25 8:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-24 19:00 Jan Kiszka
2022-05-25 8:08 ` Henning Schild [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220525100851.73c5d4e7@md1za8fc.ad001.siemens.net \
--to=henning.schild@siemens.com \
--cc=felix.moessbauer@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox