From patchwork Fri Nov 15 13:58:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "alexander.heinisch" X-Patchwork-Id: 3929 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 15 Nov 2024 14:58:53 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-yw1-f185.google.com (mail-yw1-f185.google.com [209.85.128.185]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4AFDwqYk008092 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 15 Nov 2024 14:58:53 +0100 Received: by mail-yw1-f185.google.com with SMTP id 00721157ae682-6ea86f1df79sf32941817b3.1 for ; Fri, 15 Nov 2024 05:58:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1731679127; cv=pass; d=google.com; s=arc-20240605; b=Bi/0OrwVMuOBAmrtah1zRLTku0fd3OGhxWAMGIp9/ypURjGL2gSEymlTg9Rce7zyAI LYhdUgi3Wa45M1Z+Sy85mKHHVlM7mtrdop/9MY5pGiS2ZQPV4mjZ8bsmJcIei0RDSKM1 1H3GEH2Rlm9kZ28rc60rC5wzz8ANpBKIh8UYZQccb4YbxoEMq8yT3YnEoj6YKXk+Rbp1 VtzzAjgxQc30FJgMf9+n65KSjhkLD/OuR35mEunuhO5jX+x/hPvUVqeY4jeW1RpxY/Ks fs5I6DnEbsgnw9orpKVHMT6nDf11OPyVhLiapmYmMXytDjcef+3nYjwmWVQNof5Pt+0R tJww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=e8ZXvDHfmhmqrCjVKDNPXg0jJR0eDXNxtQec25EuKHw=; fh=Nkdbdnd9EOFJmcE51ldPzrDshJ3lz02i92b35ipmOpM=; b=IL0up/AD5KmNGiJhaAexkYZp1AT898Vz+hDQAAuGQ9lQ+r2harnUOFxk9iv9toyC7+ KDR/45Q9KlpKwjI40acjYTHx4kEGWN1cKddMA5HWlCnw9eJYElIlrHMBsBHwXPQP61wC mdJyhyfcmpgudnI20c2UAFK/VI+YFVJAMZV/IezygkZFH/2ErC/AMlb0h/qTuBvaiW9v 6TvEp5ylbGG6z0eD1KNH4EkBnK+aDQYvsR+63wXfKY2+7eaDnby5Bj+Wf5Kfee6uzTNf o5SSnokDrQfM7ze5hTiTVrsd+eE1w2k/ceXyNvv5DHZ/JSH6lay84MGgv15ytl2vQ/eQ KaAw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=AwusMjQ3; spf=pass (google.com: domain of fm-1326448-202411151358422c864110c9832f4363-xjooj7@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-1326448-202411151358422c864110c9832f4363-xjOOj7@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1731679127; x=1732283927; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=e8ZXvDHfmhmqrCjVKDNPXg0jJR0eDXNxtQec25EuKHw=; b=h6F3ioT+8zfTr64wnVVDsogJdFQPJ+ODFW0KUY8y+ozOLc0zJHPDVgk22RaqspAPAm ZVfpNHsyIoOylJN2TvSc4abfm7Cheu00u9IDUQbFO+bJ3Wny6Ihq7GDbXuh78atdUVt2 x+0qs5Lh2ylRj1OMogEmXp+d9A1/DVd/AQsqOlmzeU6LmSN72zZOF/LO6oqZgxO+BhHa YyGx5i9a9gkkXfUIqnYDS7idGScLjtI5KnzG8ts6pjyP2VGBsjKS0iVgbs2j+Ye/eLGG 4gXGT0vruvBPYUxj9pr0p4dPy/PxvB4OgXqVi6x7atxp8+gDR8D3YieEJAmBwGbaKfdI 7i1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731679127; x=1732283927; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:message-id:date:subject:cc:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=e8ZXvDHfmhmqrCjVKDNPXg0jJR0eDXNxtQec25EuKHw=; b=qvFC8UTEYw+MBAyL4lMJ7s67NHMM+ZmkZ/TlSfDlnT1wcNXfNFlEaq1JxWWIiHOEgL lNxrJgAd8KUSpMOOrNicxwGb1e6HlaGZBLeeOuD9PZ/D9omnbYzaY0/MjJXIvOTL0bZo feA1jzxwVewAXX8Rr4XILejwP6RAnPqQ+AyRmwB20EPZMrlOYPslPuIHlpHbngzvFnWk R3B0PArCzH4e0r5s/YgbT75cCTKumwwaQtU73U4x7Rv0iunnVsF6pTDkK4w6YXBt/uoQ vaSKj2mvaVRndbGgSPm0IAjXtpL2SU/sk/8dBXakM19/sOiqJTWgp6wtZXRQyXBDBCPM /LSg== X-Forwarded-Encrypted: i=2; AJvYcCXNVokNFRUU+Zefr4jpNh3k7894kLXzTMnnZux8oQpCF04abs6SB/oq0JkP5EBvMcu52QCdBJQ=@isar-build.org X-Gm-Message-State: AOJu0YyrPIJFchVUS+Or8k3jhktPxrw+GJE06bwLUThm2ur8XaHsjlyV bgkfI6uSPcrEStR6ne1R7cFKV1+vTncMCr/YcAbclVnt9OeZu+3q X-Google-Smtp-Source: AGHT+IGfGV/UlCTa2SNXfTyEKnzLHMwFbOwbnwtr4wF5rn+3pCxT3FBO0QfIWG6wlk2XNqkxHTCuHQ== X-Received: by 2002:a05:6902:b0d:b0:e35:df0e:980a with SMTP id 3f1490d57ef6-e38263d5a86mr2155921276.41.1731679127133; Fri, 15 Nov 2024 05:58:47 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6902:1812:b0:e30:84f1:9a02 with SMTP id 3f1490d57ef6-e380e3bf7f1ls186011276.0.-pod-prod-08-us; Fri, 15 Nov 2024 05:58:44 -0800 (PST) X-Received: by 2002:a05:6902:1808:b0:e29:41af:c80 with SMTP id 3f1490d57ef6-e38264e707fmr2107129276.48.1731679124628; Fri, 15 Nov 2024 05:58:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731679124; cv=none; d=google.com; s=arc-20240605; b=FrW1E6aQhbPfY8uZiJmQUYJteQmtZ7dPxGwCDNhk5wp7ZqtjnqK6MUnhdBl7sgV+1c 8QsC0psTmI6CY4eO/p9qSrpPglpSy5jiswgvJHASED7TaWHGDq6oGGl+tCw/64Go4w57 GdlZAa/MW6VyL5ciCrNRWKpAuTATCNU42bs9gxUHlGTY/qm2fhSrzKB4VzxMZ5UY4J2W IzFJc3UkkTsZFppFhevhEJgD2euQOq6+UCPciQmDKG2dlCbry95TpqtxYKCVwTULKEXS ex0VTKxTwPJlyLuJJ8CcIRFTjFmqxGq+bcGXJInml5VwuZFu2Az3cbklrfnH/jyLUHoe 0cew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:message-id:date :subject:cc:to:from:dkim-signature; bh=5GZnc9woXRW3N99NPKVAvibRjdd4CXlvf7q3dt16CnI=; fh=p2NZNdSy+UicSjYUSvZGU+QYmFFPVZWXjWkELGSBm8Q=; b=FPLRq2MUcTuF/oGPUiA+qV0CpfU4hfwQZaNeEHfBrpSUKC5VDbWtH07QKxOxY1Q/Kt RDCYIyzdHVv6S25SyOXnHRdD8k8LBtrKDO931kd5iHKBzhv7xz/VDR3W8JjDEJ1e17Y7 dCqR4hUQUJt68L0wPee/E+Lg0qwVlua5o3hkR1oiJnLd4fEpJ7bNf/TYZTLSFkAfWeio WtoGiWit3mTrhY1CeyLqRK+AyYLT7VynoPV+44x6rEDM2TZ1f45k1eTV+c4dz+Cf4LE9 B/KyVkdY/L3eyAs/kkKjzvxx64m08Qz6RvBBctQysEvoJyQlpb1ifK3vWpATqC4PgvSg 7Gng==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=AwusMjQ3; spf=pass (google.com: domain of fm-1326448-202411151358422c864110c9832f4363-xjooj7@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-1326448-202411151358422c864110c9832f4363-xjOOj7@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-227.siemens.flowmailer.net (mta-64-227.siemens.flowmailer.net. [185.136.64.227]) by gmr-mx.google.com with ESMTPS id 3f1490d57ef6-e382e18f4d2si65179276.0.2024.11.15.05.58.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Nov 2024 05:58:44 -0800 (PST) Received-SPF: pass (google.com: domain of fm-1326448-202411151358422c864110c9832f4363-xjooj7@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) client-ip=185.136.64.227; Received: by mta-64-227.siemens.flowmailer.net with ESMTPSA id 202411151358422c864110c9832f4363 for ; Fri, 15 Nov 2024 14:58:42 +0100 X-Patchwork-Original-From: "alexander.heinisch via isar-users" From: "alexander.heinisch" To: isar-users@googlegroups.com Cc: Alexander Heinisch Subject: [PATCH] isar-installer: Fixing supervised image deployment in isar-installer when target device is not empty Date: Fri, 15 Nov 2024 14:58:09 +0100 Message-ID: <20241115135809.599705-1-alexander.heinisch@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1326448:519-21489:flowmailer X-Original-Sender: alexander.heinisch@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=AwusMjQ3; spf=pass (google.com: domain of fm-1326448-202411151358422c864110c9832f4363-xjooj7@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-1326448-202411151358422c864110c9832f4363-xjOOj7@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: alexander.heinisch@siemens.com Reply-To: alexander.heinisch@siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED, RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Alexander Heinisch In supervised mode (!unattended) the check to override non empty targets was combined with the check for unattended mode. Thus, resulting in the wrong condition branch when the user accepted an override (closed dialog with 'Yes') In such case the script was assuming similar behaviour like in unattended mode, thus evaluating the installer_target_overwrite check, which in that case is neither set via kernel cmdline nor via auto.install file. Signed-off-by: Alexander Heinisch --- .../deploy-image/files/usr/bin/deploy-image-wic.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh index 91c0518b..7f552eee 100755 --- a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh +++ b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh @@ -125,10 +125,11 @@ if ! $installer_unattended; then fi if ! cmp /dev/zero "$installer_target_dev" -n 1M; then - if ! $installer_unattended && \ - ! dialog --defaultno \ - --yesno "WARNING: Target device is not empty! Continue anyway?" 5 60; then - exit 0 + if ! $installer_unattended; then + if ! dialog --defaultno \ + --yesno "WARNING: Target device is not empty! Continue anyway?" 5 60; then + exit 0 + fi else if [ "$installer_target_overwrite" != "OVERWRITE" ]; then echo "Target device is not empty! -> Abort"