From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Tue, 18 Mar 2025 15:06:43 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-yb1-f185.google.com (mail-yb1-f185.google.com [209.85.219.185]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 52IE6fQu022675 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 18 Mar 2025 15:06:42 +0100 Received: by mail-yb1-f185.google.com with SMTP id 3f1490d57ef6-e6372bafb8asf6807747276.1 for ; Tue, 18 Mar 2025 07:06:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1742306795; cv=pass; d=google.com; s=arc-20240605; b=EzsyOFOTwSCLI7krrgxBAYkv6fKf96CwnZinqZtbeQLg5xa4UWpPFM1MbVXHko0dvj bTAo2g3icZNWV7UJJ8oKR8m2Ymrr/p2gkNxtkg3KryJSGVHhfLv8W/utruH1U/78vy5G BQGegmmbH2o2ZnllmRmtMtgDwPJSGFEZJrJwF5tDq9XUJPi+V00tx0N88wTYxbh2fZ5k 6pbmAqWhq1rskGuCHaO7kbDxGbEEdTSNMN7ziI9tuqMu+TB0YRabl7ISR3RPUixgn8Hp MrdnbRF0A41F1dGQGO6xJC+gXfBBkkH4y7iIloHMmqwk9DC6EVKd2nPWB12RRVYdb3T1 hC1g== 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:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:dkim-signature; bh=9DyrReUsUCZdnVj/3Il1GIIvku4ebTRZ4ky3K1YjWmU=; fh=8+DkfBY47kg/oMnN79tg+h33G+9yWreU4iWCFDsfbNU=; b=lUXo+qhIt47KHIWy0RN7OdiKMCPWQ2vfUdU5NhYjQeTT2BIOKx0oACxyB2H71FRnOf omHGHNMLMSbuvLHeH9v7cxA8nIp7scshvN0OZerpGMqxVP+RGb7KWNzZOLSjwKDTlHfH P9/aBoUywMZGAZHChfqgpXsI8WmTDSpGX8cPOn6YwsCkT/lPe6ZWSkqUEVbOm9gB7QAb pPs9xL86tbHhKFJfpmyf0+fGJ7NE65AxejVhRjOIpB60ynzLDLiwUuMpnwqbW4SbzMtb mKC1DTriV3yUCOOMjvqHswrFNIFsZKoyuAZoYCzdox7jJLi1ciXmNKaCQJHvrr0l+W7Q K7yw==; darn=ilbers.de ARC-Authentication-Results: i=2; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1742306795; x=1742911595; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=9DyrReUsUCZdnVj/3Il1GIIvku4ebTRZ4ky3K1YjWmU=; b=NONGxUQ+PTNAwZ+jWtCRKcgF0ENouMPUajz08NQRaV6K7d+Q3r3YZ90fIjWkbu0KJJ EUXnJjp3yzhSIfDPSS0ZJdku5MiL1BKwPNVTVLq+etyJYCEmmlZaIq3xWl7gUw5mvovr fGURu7LgfygoCqnPwIHKISvEgge6nCymJwYutLNgJrYT9ZhnKouAjGH/peVgdqDuWveg U4sFiXudGo7NLo09nLf4qW6CNZnIUw8TctEnCx5oLGly7HdO96rFcQ9q71ARe5lDmrkw 1pUYVSL7lt7QGSljwCUwubNjFWziEJWgYCANsXW0X7sYrJc+d5UgUoeOci5DWdHA6WPF vJYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742306795; x=1742911595; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:to:from:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=9DyrReUsUCZdnVj/3Il1GIIvku4ebTRZ4ky3K1YjWmU=; b=BSQLqlgsFJLtT9Q5k9lB090PYg4FXgnfbj/Z+8B/hNiMfcJ3MJ5Gl4GPcH21wtuKOZ jtcsROxdng6ONMIFClEAcM+a7bZUWWAjGz4VGoMpjCY0pJ95OEBcsMmmp/5qafHt9KFm ZoVDeTjAzxlTH6dVHEdTGSrvtZMraNAXiMDRh4ZayJUFskGn0OPXZReI4Fjo1X135Qbk z9yOwhdd6fNUnOFioCIr63Qgv3HYuz/pAqzm742XD/997J3FwaC8PdD//uYzkz48PWeq 8tqt8/4h6VxjO41BYS+qEFDQnU1HTnbEhvFVI/MJN6uUkiyPkKzXrfwVm2mM9mjfrK9M a61w== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCXKOIVbN3L9Dy5Jiraoejimspc3T9hslwPYehokVWa0BTLYgS13If+9gYICf6aYC4QXnD2s@ilbers.de X-Gm-Message-State: AOJu0YwEUqTFU2fNwXPJfQ4UGaHc/6iT1ZBKhaZTQOfh1oaWuAUqk7dF LZxWsVGRKnv7R7YH0lckySRJvidpWn3AlZjXUWm5jVz6v5BErpX6 X-Google-Smtp-Source: AGHT+IF6lVBkfdJxuElM/FS4ROKsjZaSBafucrIU5IKtiQWlnMYGbBYuIDUPaRXPMYnjaYrTH/1/dA== X-Received: by 2002:a05:6902:1009:b0:e63:6e52:2140 with SMTP id 3f1490d57ef6-e63f64f8086mr18576354276.16.1742306794861; Tue, 18 Mar 2025 07:06:34 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h=ARLLPAKCwpyTj9fGTSC5GZxEpHDYLLeNJuRssgqupv3XOU9isg== Received: by 2002:a25:2905:0:b0:e61:b422:146b with SMTP id 3f1490d57ef6-e643eecd957ls990595276.2.-pod-prod-01-us; Tue, 18 Mar 2025 07:06:33 -0700 (PDT) X-Received: by 2002:a05:6902:100e:b0:e57:442a:befd with SMTP id 3f1490d57ef6-e63f659d6famr20758768276.32.1742306793584; Tue, 18 Mar 2025 07:06:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742306793; cv=none; d=google.com; s=arc-20240605; b=KpZD2kgVEIXj6XnxOBE1jKMe7emjH+UHEL3Hgw4T5YJb+RuKxELeO1+Lx6I2B//CGc gGyxwvtR/soU7VWxVPH/ZsJI0QkrXdieaFwM1gYI553u9yY0ph/XbpPk4MLpjDezgx54 bD3X5M5As4iMjZlMEgKC5jBErFMhkeUXlihZy4/top40SfnpqeFmZn6uMLCjzl0OOdrJ rbB5SqzaaEqMcVfPe7scsLT+vmKTO5GjJJ0vP73VL7Uj10KnMBH4kwJorBlJHvt3NgUl CFOeYZ5QRpuZJ3PwFNZ//bHslyKY3CHRVfAJVZ5FvjSobX6DvHqGx+9Pnhcs9MD6B819 7new== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=8PbFWrmvEx3n0kEsyzM6XU05NQHQmIviDlCEZFW/+pA=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=jca6YKmVs8RxiiZXSKmNXTkzFpO+p9Fy6xb4D+9hWbmespY8XbkNndbo4ic+fCOD29 Z/MO0uHDMwQ68Xmo0tMzE2vtw4abO9Z9LYicIG72JtFWvmKL2Jodpua89koV3jD7sYjN idnTVRpnwmGG/4Bku05gio9e3Mz3me3q5Q4rcB4yMut1SZ5k1ddtMUW37yjWVWTEcPJF a52Uu+RGpMagbp142dH+eAt8/FqokG7FqAldwgNqvb0mPLW9oX67lW3Z3uYaQnGPO4C9 fPtq/pcH0TYwDh6PZgCPwnc+M2WrNAX8o5+bQ/4ni11AjiMySWZk6xiKqQjKBmWS8wl5 RB4A==; 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 Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 3f1490d57ef6-e63e5471b6fsi614145276.3.2025.03.18.07.06.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 07:06:33 -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; Received: from hp15.localdomain (mm-54-5-214-37.mogilev.dynamic.pppoe.byfly.by [37.214.5.54]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 52IE6S2n022611 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 18 Mar 2025 15:06:31 +0100 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH v3 4/4] installer: Run unattended mode on the only terminal Date: Tue, 18 Mar 2025 17:02:17 +0300 Message-ID: <20250318140622.13676-5-ubely@ilbers.de> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250318140622.13676-1-ubely@ilbers.de> References: <20250318140622.13676-1-ubely@ilbers.de> MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, 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-Original-Sender: ubely@ilbers.de X-Original-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 Content-Type: text/plain; charset="UTF-8" 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-TUID: vXCN/QSX+QVd This fixes race between two unattended installer instances running on different (e.g. serial "ttyS0" and graphic "tty1") terminals. While one of them starts writing the disk, another one fails and schedules reboot in 60 seconds. Depending on build machine performance we can get incomplete installation and broken target filesystem. Selected terminal with unattended installer can be set by INSTALLER_UNATTENDED_TTY variable. It should correspond to one of INSTALLER_GETTY_TARGETS from deploy-image.service recipe. Signed-off-by: Uladzimir Bely --- .../recipes-installer/deploy-image/deploy-image_0.1.bb | 8 +++++++- .../bin/{deploy-image-wic.sh => deploy-image-wic.sh.tmpl} | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) rename meta-isar/recipes-installer/deploy-image/files/usr/bin/{deploy-image-wic.sh => deploy-image-wic.sh.tmpl} (95%) diff --git a/meta-isar/recipes-installer/deploy-image/deploy-image_0.1.bb b/meta-isar/recipes-installer/deploy-image/deploy-image_0.1.bb index 242ca88e..1af3a6dd 100644 --- a/meta-isar/recipes-installer/deploy-image/deploy-image_0.1.bb +++ b/meta-isar/recipes-installer/deploy-image/deploy-image_0.1.bb @@ -7,10 +7,16 @@ DESCRIPTION = "Install image to device" inherit dpkg-raw -SRC_URI = "file://usr/bin/deploy-image-wic.sh \ +SRC_URI = "file://usr/bin/deploy-image-wic.sh.tmpl \ file://usr/lib/deploy-image-wic/handle-config.sh \ " DEBIAN_DEPENDS = "bmap-tools, pv, dialog, util-linux, parted, fdisk, gdisk, pigz, xz-utils, pbzip2, zstd" + +INSTALLER_UNATTENDED_TTY ?= "${MACHINE_SERIAL}" + +TEMPLATE_FILES += "usr/bin/deploy-image-wic.sh.tmpl" +TEMPLATE_VARS += "INSTALLER_UNATTENDED_TTY" + do_install[cleandirs] = "${D}/usr/bin/ \ ${D}/usr/lib/deploy-image-wic \ " 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.tmpl similarity index 95% rename from meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh rename to meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh.tmpl index 7f552eee..33a409f3 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.tmpl @@ -10,6 +10,12 @@ SCRIPT_DIR=$( dirname -- "$( readlink -f -- "$0"; )"; ) . ${SCRIPT_DIR}/../lib/deploy-image-wic/handle-config.sh +if $installer_unattended; then + if [ "$(tty)" != "/dev/${INSTALLER_UNATTENDED_TTY}" ]; then + dialog --msgbox "Unattended installer is active on ${INSTALLER_UNATTENDED_TTY}. Please wait for it to finish." 7 60 + installer_unattended=false + fi +fi if ! $installer_unattended; then installer_image_uri=$(find "$installdata" -type f -iname "*.wic*" -a -not -iname "*.wic.bmap" -exec basename {} \;) -- 2.45.3 -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250318140622.13676-5-ubely%40ilbers.de.