From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7387032429685374976 X-Received: by 2002:a05:600c:4c27:b0:425:8a26:1f3e with SMTP id 5b1f17b1804b1-4258a2620bfmr17178605e9.15.1719927515199; Tue, 02 Jul 2024 06:38:35 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:3b9b:b0:424:ade3:c6c7 with SMTP id 5b1f17b1804b1-4256baf882als19138015e9.0.-pod-prod-03-eu; Tue, 02 Jul 2024 06:38:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYpK/96QnWgHHnyPcxqAkky0l9SnNnGEKydKJxvwR0ljFUJrdXjdDe2rNq9Lb56UaNA9eS X-Received: by 2002:a05:600c:5486:b0:424:a779:b5bf with SMTP id 5b1f17b1804b1-4257a03a561mr63106675e9.20.1719927513034; Tue, 02 Jul 2024 06:38:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719927512; cv=none; d=google.com; s=arc-20160816; b=Ls9Wr8CsZNdUz7jSDgQZhHBBUeuc8Yt9lJXrwttGONBTB9F39+1wsqYf/FYX6TepWH SRZQ+7NALpP6lfZBWCI1WuBmY/yy2oQuJrBhDPazzuWHOsJhV4KaN2opL45KnnTa3JNH J6gpRzVhUWw8BGjiKt7yDhVuC1mUuxNZYbPj82tBcPalCYkGRZTyZyJJXO+1tiISErj7 4B/jp+Sk8gYLNG/hhJ8LD0NvKIbpfCKC/7DbdJYs0hFj0Ghh9sZiESXchmCPsVtUaoQp K7MAhzbc3/ckQPf/SDOfG48cN33Hf7A79fMhZa8TMBvh4BhQ9j6t0tOShDIGnYS8jxtd 8zOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=3gC5aFHUmtelwEfs9ALjODKNg/upm2KsGay7mgbuZVc=; fh=TWGwN84gUgHIe5O4CbyH9KISyeWwGbvUX7cnJPxVD70=; b=v2M87i1AejXkvfwailxGM00cmXHxHwe5ErtF78d+7z8gDpvolJebDahTBqvgmwYQER DgkYDtiXjYucqxtlfRN4fcH2YUvkZR9bjN82jew08mG1H9OIYjcbQcZ3FdP20Me9P8y+ JjjKtrFNdPsjwDLNoaXMoEpDTbxO5Tg53OCL2oQXv4uIrNwqQxDwiyUe9/vXeOXFLKal ieU/9Evsd5GzDTL3pFWctycCcipOeitl1GfhpOMiOJdiODduIm63lZqc3BR8dkpbepeh obWRV4EXwQeeL4AVorEVWmAP4XCRk9Y7A5FWtU1D4emkAWs87C2zVf/NN1Dz45uwc1Dv fqoA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=nWnQUL9G; spf=pass (google.com: domain of fm-294854-20240702133832b526d4488568fbe3a3-arcwrr@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-294854-20240702133832b526d4488568fbe3a3-ARCWrr@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Return-Path: Received: from mta-64-225.siemens.flowmailer.net (mta-64-225.siemens.flowmailer.net. [185.136.64.225]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-425788015e4si5278485e9.1.2024.07.02.06.38.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jul 2024 06:38:32 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-294854-20240702133832b526d4488568fbe3a3-arcwrr@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) client-ip=185.136.64.225; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=nWnQUL9G; spf=pass (google.com: domain of fm-294854-20240702133832b526d4488568fbe3a3-arcwrr@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-294854-20240702133832b526d4488568fbe3a3-ARCWrr@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: by mta-64-225.siemens.flowmailer.net with ESMTPSA id 20240702133832b526d4488568fbe3a3 for ; Tue, 02 Jul 2024 15:38:32 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm2; d=siemens.com; i=jan.kiszka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=3gC5aFHUmtelwEfs9ALjODKNg/upm2KsGay7mgbuZVc=; b=nWnQUL9Gv4LinFJd1uzzc3dNv9+z53rd41YpGWQGn3TUAnsKEBf2d3XJgWtQl6/CrjQV/E 91hf2AWR1UlRDZbbmCHp2FSY/hfOIw66RcxXsEH927D/TZNFbGnhz8wyWW2x/PiUdGOScAUA dwIgAFK/kIofcovy8q5gOvNrIQ9hQ=; From: Jan Kiszka To: isar-users Cc: Quirin Gylstorff Subject: [PATCH 03/17] meta-isar: deploy-image: Change reboot logic Date: Tue, 2 Jul 2024 15:38:17 +0200 Message-ID: <6e97e882f080e09a9f7d777cc84e9cd089d92d11.1719927511.git.jan.kiszka@siemens.com> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer X-TUID: 42lLjAY19Kar From: Jan Kiszka Pull the reboot out of the script. This allows for cleaner integration with different calling environment, may they be a systemd unit, an initramfs script or simply a shell for testing purposes. And if the script exits with an error, wait a minute before rebooting the system, rather than just trying to re-execute it. This permits to inspect potential error as well. Signed-off-by: Jan Kiszka --- .../recipes-installer/deploy-image/files/deploy-image-wic.sh | 2 +- .../recipes-installer/deploy-image/files/install.override.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-isar/recipes-installer/deploy-image/files/deploy-image-wic.sh b/meta-isar/recipes-installer/deploy-image/files/deploy-image-wic.sh index 8043aff1..12c1eea2 100644 --- a/meta-isar/recipes-installer/deploy-image/files/deploy-image-wic.sh +++ b/meta-isar/recipes-installer/deploy-image/files/deploy-image-wic.sh @@ -105,4 +105,4 @@ fi umount "$installdata" sync dialog --title "Reboot" --msgbox "Installation is successful. System will be rebooted. Please remove the USB stick." 7 60 -reboot +exit 0 diff --git a/meta-isar/recipes-installer/deploy-image/files/install.override.conf b/meta-isar/recipes-installer/deploy-image/files/install.override.conf index 73874caa..357d8662 100644 --- a/meta-isar/recipes-installer/deploy-image/files/install.override.conf +++ b/meta-isar/recipes-installer/deploy-image/files/install.override.conf @@ -1,5 +1,5 @@ [Service] ExecStart= -ExecStart=/usr/bin/deploy-image-wic.sh +ExecStart=/bin/sh -c "deploy-image-wic.sh || (echo 'Rebooting in 60 s'; sleep 60); reboot" StandardInput=tty StandardOutput=tty -- 2.43.0