From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7374392591763111936 X-Received: by 2002:a2e:8695:0:b0:2e9:6265:9926 with SMTP id 38308e7fff4ca-2ea951ddd1emr50443721fa.49.1717396703277; Sun, 02 Jun 2024 23:38:23 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:7c05:0:b0:2e6:a17b:c54a with SMTP id 38308e7fff4ca-2ea9e5f8211ls6691001fa.2.-pod-prod-06-eu; Sun, 02 Jun 2024 23:38:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG772ZF9giedH5NxaCiyfgw4B/e6qqiWMSep0MVQai+EJ1zkkThsPHlHU/HNvprDhDVqXc4 X-Received: by 2002:a2e:b053:0:b0:2ea:938f:a23d with SMTP id 38308e7fff4ca-2ea951b6102mr52859201fa.42.1717396700768; Sun, 02 Jun 2024 23:38:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717396700; cv=none; d=google.com; s=arc-20160816; b=La330mOSJsNRoRrshEHxfw61CCrHHyPW8gmzkO15KE7Ow/4UCIwIkpL8r4xcsF43Yn OfUvXGHEG/GjcwJKzs93kJRYpj/5uXXPEuFW5wryNhEXMjPUlzKi1Cx4RqjzkAoQNPD1 3dDH2kdFiq3yaQOa6w8G45jbc99V1TVQK0ciBu1TFD1JksLseuMJM8lUwCjsZJKAOeD3 WkULX4zvnIsksrLontt6Wpe/TcGlnAuHVWnTPnqAfR31wrymPT1OPsC44xg/33VZDUHn iYKptmFfWCKnufR7X2MrUbGg9NkUSzgA0kCD1zfgE6Xon936JSvM0y9rk5GoRNCVtYAj c44Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:to:from:subject:message-id; bh=w4/w2nHoIXIQ9pco4bn+zm7ElBCZP686uyj1dUUy1k8=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=FGsiJNPCvBz/euZp8E6K5OpOwmQBHAxvHrNceZZ67todIBksSo96MaIttXaesF2FqT 5a62sazPW33b7cGgIdZ+cG/3Tl04zCyGqQWkb/eonjSPgBKkMwoOyrIU1Nz2tPaQnDe1 1WWH6ktd7lE+Np9iBnWmHw0VK/GQq4hAc0lSSSbtcFv4TbDJRe1KvSp9pXqtSkqvCvP6 48sda6IMrG3bSTpFlkT+kZ/uRTCy49QWUx2wqdVKYEUL5LcdJwsHxDr/AQTHROyQNQKL Wh+3ZsCEFgetyfQLSZ/CG861JhLRaPQqQpatjU/as1GjPbWYhNj090f7qLT1ePbRx69M umuw==; dara=google.com 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 5b1f17b1804b1-4212278a45dsi6400435e9.0.2024.06.02.23.38.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 02 Jun 2024 23:38:20 -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 [IPv6:::1] (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 4536cIXs007363 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 3 Jun 2024 08:38:19 +0200 Message-ID: Subject: Re: [PATCH] expand-on-first-boot: Fix "label: gpt" detection From: Uladzimir Bely To: isar-users@googlegroups.com Date: Mon, 03 Jun 2024 09:38:18 +0300 In-Reply-To: <20240529120924.14501-1-ubely@ilbers.de> References: <20240529120924.14501-1-ubely@ilbers.de> Autocrypt: addr=ubely@ilbers.de; prefer-encrypt=mutual; keydata=mQENBGO2eUkBCACtT+T3OrPVSExBmqfgXT3lp9XcdxRzjYp26wezkgYjjBXaf36bxtaAf S471VoQtpar0RVeFfW7WDDdfX9ZclSj36zBQe+RVSJzoNoNQfjOXWuSHb5Z+cpAFtqBY4muxK4+ia IlLJd6CN3ejOsLHATtCeHHq8wi0z2T+KdLQO+wQRgo2hjj0Lp9pGTrKJry50HP/o7Vbdu14dOx2xq r8+wPc6SQbBIrcqaa4MqCQC00vQG7eXvo+k2MOw59FDdpMH0KR9mHgp3u/s4I+4YRBArukt9G9xz/ rsEFmxAIBC6N/a6Hzwg4puc91n7ABDsPg8Vp+X3MDraujN0dvR6OKVNtABEBAAG0IFVsYWR6aW1pc iBCZWx5IDx1YmVseUBpbGJlcnMuZGU+iQFOBBMBCAA4FiEEJqPNVhVGyk12Eh+PAUQYBM/2FkoFAm O2eUkCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQAUQYBM/2FkprlAgAmuna8Hm9EyoEtTl DBGDg6Zm4ZLp5ffvZBE946h92jepDrteoxsJ7pSzJVC2HmDLa4iZUao7lLLbDsUj5x45/iLJcqBZK k3YnAxP2r6a+kI+1VVQY1pxdG1nlJAbdNzoojm/qmezNPSrqni61KVMQKsXBCWhIjSXDSM9CsBj21 a+9qaVqfxovJGTn9lgrZO+xzKQNMKZeOouJlscVuFj21P0ww3/YENiU/nMeTSuYypO76mDtAd08Jo nc3yuHa9MJGei5ixN3wT+IrGR2aL2hdw2M6NgH7sYbL2Zi4ugD6RXHJai1Bh2yvFSVqSQ+M6QOInT 4ud7wslm1XRB065dXtA== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.1 (by Flathub.org) MIME-Version: 1.0 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: F2GxZJTlVlRN On Wed, 2024-05-29 at 15:09 +0300, Uladzimir Bely wrote: > Commit 991d2e9 introduced the issue when the whole script early exits > (due to "set -x") in case grep doesn't find the pattern and produces > an error code. >=20 > In this case last partition remains non-expanded. >=20 > Fix this by masking error with "echo 0". >=20 > Signed-off-by: Uladzimir Bely > --- > =C2=A0.../expand-on-first-boot/files/expand-last-partition.sh=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 2 > +- > =C2=A01 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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 0cb2ee21..8ab0f8f0 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 > @@ -41,7 +41,7 @@ if [ "$DISK_SIZE" -lt "$MINIMAL_SIZE" ]; then > =C2=A0 exit 0 > =C2=A0fi > =C2=A0 > -IS_GPT=3D"$(sfdisk -d "${BOOT_DEV}" 2>/dev/null | grep -q "label: gpt" > && echo 1)" > +IS_GPT=3D"$(sfdisk -d "${BOOT_DEV}" 2>/dev/null | grep -q "label: gpt" > && echo 1 || echo 0)" > =C2=A0if [ "$IS_GPT" =3D "1" ]; then > =C2=A0 dd if=3D"${BOOT_DEV}" of=3D/dev/shm/__mbr__.bak count=3D1 > =C2=A0fi > --=20 > 2.44.1 >=20 Applied to next. --=20 Best regards, Uladzimir.