From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7107445708784926720 X-Received: by 2002:a05:622a:1355:b0:305:9ae:4bd6 with SMTP id w21-20020a05622a135500b0030509ae4bd6mr8859200qtk.445.1654860003480; Fri, 10 Jun 2022 04:20:03 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a0c:c1ce:0:b0:467:db21:d3d8 with SMTP id v14-20020a0cc1ce000000b00467db21d3d8ls6201314qvh.11.gmail; Fri, 10 Jun 2022 04:20:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2jyEWKs5c2ww3rs10RcET7d6PeC7lPKBbmWlrW9y6ufH9G/GCmnXvH0H8Pxn3maFl4wjP X-Received: by 2002:a05:6214:ca8:b0:464:4521:89fe with SMTP id s8-20020a0562140ca800b00464452189femr50428451qvs.68.1654860002975; Fri, 10 Jun 2022 04:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654860002; cv=none; d=google.com; s=arc-20160816; b=KSXz4yPpDdqLTVg9GRKejsrE4LkR6DUTe82qas15QWvgPNAxX7O7DJ2yhCWVwlDwLL S4LXqbhZ5X4zI5udE1sUEuSNTfUv18VYk1mgbEsIDksvre8QlywZEqXoX04wtBIGQqJF wyokOuIzCwtsWsHGcp0tL7da1AkpL21COysFfNTBZGlBHPfObBt683W0dI5GF3ZUOzMe 5+UwhiEdhYy4my45Xqe3LhY1EklyOBexYeHAt6uCwlIYjsSbK1G6qqe4vxvtcI/jTazI wZ9Sb+lw3GKYBIHgshm49xlOdZang80APNyrj6bBR1Y1ZpQgPBj85A0Ex60lY8R9QSaU AF8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=s3+2vZaPgsmltFZiB5zie2safzHOWS5P1QJb+iipHJo=; b=M0Q8Ap8LaSIWVso7QURTle+Scdg9QNn3hc+O+VqCF7vfLZA2Q08+fM9W7vqdiQFXeq 6JBNL/SzeCnGxbBQ7aL9x15ZueXtLwKETnHSP35eCkXrzV/XfVuNXTm1rDC01FcUEyv8 qcQtH5qfl/4k4Dj3s9Ew6cZTHR0QKy8SAOsBCQI3brD0B5cYu4AwKs5Q7EH557b8oUtp ls6PvqiKURO35Q5rXj/Hfdim2AtVXgovZXg8tNhoCrgxpxETSPm6MibGpKvByCN8ED/5 QYBeTxgm4BIoaUkntoiyF9U3ztNSWfdZVUvRubjLYocHafLg15aL/YitTS19I6uyoHzu rpDA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id l19-20020a05620a211300b006a6c222b5e6si746347qkl.2.2022.06.10.04.20.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Jun 2022 04:20:02 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from baighyz.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 25ABJxVT013853 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 10 Jun 2022 13:20:00 +0200 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH v2 1/1] expand-on-first-boot: Fix early exit with error in helper script Date: Fri, 10 Jun 2022 13:19:59 +0200 Message-Id: <20220610111959.3069-2-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220610111959.3069-1-ubely@ilbers.de> References: <20220610111959.3069-1-ubely@ilbers.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: rEyuuLu6Q4yi Changes in 342a751e introduced a regression when error from 'find' makes helper script early exit (with -1 error code) just after an attempt to assign ROOT_DEV_SLAVE variable. So, the last partition remained not resized. Masking possible error from 'find' doesn't break the logic and allows to continue the script execution. Signed-off-by: Uladzimir Bely --- .../expand-on-first-boot/files/expand-last-partition.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 f3e29a1c..c0edde73 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,7 +11,7 @@ set -e ROOT_DEV="$(findmnt / -o source -n)" ROOT_DEV_NAME=${ROOT_DEV##*/} -ROOT_DEV_SLAVE=$(find /sys/block/"${ROOT_DEV_NAME}"/slaves -mindepth 1 -print -quit 2>/dev/null) +ROOT_DEV_SLAVE=$(find /sys/block/"${ROOT_DEV_NAME}"/slaves -mindepth 1 -print -quit 2>/dev/null || true) if [ -n "${ROOT_DEV_SLAVE}" ]; then ROOT_DEV=/dev/${ROOT_DEV_SLAVE##*/} fi -- 2.20.1