Message ID | 20240221082221.11997-8-stefano.babic@swupdate.org |
---|---|
State | Accepted |
Delegated to: | Stefano Babic |
Headers | show
Return-Path: <swupdate+bncBAABBQ7F22XAMGQE35SP7HI@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=gf9Pjvka; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::23d; helo=mail-lj1-x23d.google.com; envelope-from=swupdate+bncbaabbq7f22xamgqe35sp7hi@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-lj1-x23d.google.com (mail-lj1-x23d.google.com [IPv6:2a00:1450:4864:20::23d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Tfq5N5q9Jz20RF for <incoming@patchwork.ozlabs.org>; Wed, 21 Feb 2024 19:22:32 +1100 (AEDT) Received: by mail-lj1-x23d.google.com with SMTP id 38308e7fff4ca-2d240155a45sf24450041fa.0 for <incoming@patchwork.ozlabs.org>; Wed, 21 Feb 2024 00:22:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708503748; cv=pass; d=google.com; s=arc-20160816; b=fYMBgtkJ89XTGi8FZOF64qc/jr6NZ1irt8dWvJL0V+Yh1eAtYwjzsNydlZAcYdmaw7 h8cpaQWBRlA//ut6cd37poZuazy4ZL0mo57fDjUOarMpZKtB8w5YcVJ6mud22NrnRN9x C5RSO0xzHchmsjIc993UXr6B4g/AKb7V076ntwR7WGdXd/8wLTkiW/r/I+PE5b4v9rzQ ZKN0Ffl23zLJgef7vf5QQBH8h7f7LouUv1H+PalZ1VLHws972EWVWTp8tq2vQO1tAR5W NwXbRZV4UgcBOauD8DHqWFXWnock/98GZx1G2pQhY6F1L9NKe5+/XQwmJP9KCD2FiLTQ oXug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:ui-outboundreport:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=eVj2aIq0VORYVvy4lwH3AEwZCsiPVRrcgYj/OZukpkE=; fh=DOgogxXHJvco6HWvvB9SIltY//GnDnlYyIeSU6aYky0=; b=Zv8sdvybuKwRINB3seaH1TWcHWuCVmb3c7fCZikg51LwRwABxHJ3PRMysYA61Q9/pR ag0hRlE6KS6twBk1VSzOi1H01PTBb08fpLD0klWuSneVrTfYP6vm7jrtfcZgshAaGrfP 1kMI86ZfKgYifZoxhH+RLTDUewp4b5STaQ6862D+xkG5trGnP2ZdNLGPsDt9euVKq+PQ t7BdqpRThYT9rVsfnv4hR8I+m5avhZ4NmKrr+xiyGo9tQp3jbslfDCt7B+igFetEF8tr lfZTyMnuQL8QHe68aXyX06uVULYf+w0t8dckymd0cTwWOpNvuLx6dB8E+CVkUJ1oBT7q FBiA==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=VFuHxN0W; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.126.134 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1708503748; x=1709108548; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:ui-outboundreport:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:sender:from:to:cc :subject:date:message-id:reply-to; bh=eVj2aIq0VORYVvy4lwH3AEwZCsiPVRrcgYj/OZukpkE=; b=gf9PjvkaDTKUPw+jIlISMWDA3AHqTCj3g9zhrcVulyoif0WNBAMXWfuL5pdbR4JUde 0EFQgPZw4tVDElTFdYUQ7a/mOZUkqcDLVLxrov34ohq4Lk+gUmM9T4Ms2EI/PczWCAc1 jVF8pvvnzGuiJR+Ts+OsyKnNR3yVpTgPRdTkQVe7onTog7Giv9TBiRHUhIN2mj1i/ArW RtYbKWhxsVWLXYwdwmnyNkJC2TS5z3U1Let8ji3OypVehAf7JoCOeMkJ3ySLZWualo7v gFLTOo5vWrIqAWpsxQSZp/1b+YIinLIypP3YsH9Kp1OotuNOBZBtg2BxGeoQiqVaJpO1 9/+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708503748; x=1709108548; 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 :ui-outboundreport:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=eVj2aIq0VORYVvy4lwH3AEwZCsiPVRrcgYj/OZukpkE=; b=eCLqocmEaA+brL0YvoLfs0fyH42QOvrhFhaeNdgyRj/UVx2IrVcmUn8GxESSF9DEko bDywuLwrahPPEzs5hoPytTJJjlJLkSfEVMiGbPQk+O64I4aqrZdV124zzENoulDys2IA +PG6+/wnMAJMaE86fai5LIsxHQIvuaS1vPraLtBysbW0t5GPcYdPuJPLoct78u6IePWo /YN9frZnre6Y45p4iGOkqU4Rs5DVfWp0kbU/9yJUV6n+liX6vEe3LV3beluifFM+Eott ytZLiM5xiNUh8nRJ3b5TaZVHww3FDF/D5toWPrSb2/ASgHA1ouhcwGJpX7aYTdzGl2g2 R4vA== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCV1Da09MOTvyr5d35DRDCGa3X/rnUDI7vpWsRFHQfFH2LrBMsLmAEcHY04GPvIz1fKjAvHS37zLCo9mkW8HsIsUE3VSQRnCtN4zNdubOQ== X-Gm-Message-State: AOJu0YzVhJgmMUQQ35xqrq3KuH68FKCxInWQbYAXGD67J6LVKUSgrnkh O+cU7ZXJ441qUmDyRb+ZMTLvfbddFIqHZFl6nRkCn1/bn30bFoAp X-Google-Smtp-Source: AGHT+IHy60LvodUll21HF7wqQD/BTTyh0Zkk2HAVJlxb5fCishySuUmvJwHNHH0NA7ET0aNiKavSVQ== X-Received: by 2002:a05:6512:3dab:b0:512:bce9:11af with SMTP id k43-20020a0565123dab00b00512bce911afmr5512552lfv.3.1708503747680; Wed, 21 Feb 2024 00:22:27 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6512:3d18:b0:512:c39e:3a7c with SMTP id d24-20020a0565123d1800b00512c39e3a7cls41814lfv.0.-pod-prod-08-eu; Wed, 21 Feb 2024 00:22:25 -0800 (PST) X-Received: by 2002:ac2:4244:0:b0:512:b066:be25 with SMTP id m4-20020ac24244000000b00512b066be25mr5787207lfl.37.1708503745341; Wed, 21 Feb 2024 00:22:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708503745; cv=none; d=google.com; s=arc-20160816; b=stS2PZnYD/QL3Mn/ltXsuz7+DoLsgCOgfsWXUL5/AoRYW24JEBkI3smYA1Cyrh7mrk LRo62lcdbPLVrNPWGmHGgs1Q+8CZ9Nc0PoRi8/NaHaT8O5dug+K0xUPO70HDl2bPhh66 wh2UMrc7BDS97ldasumPZfUS9tkEs50z7FBgpRuxFlZ7vPzNJ9reblL4sGQ2ATJRLAQO 17eV+caq+bnGGgWH8T6GjCladdQg/XYT5w2Y+vygXuRM8eY54bHHmd6Wdr5wNUQEMvbf qRsYdfMJ3714wcX0BlkDhNolygwTK2jevCmoZzCQPx9EBYK7pEe5ZDZ8tKcD28gTz8wq 4MGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=05SLQ0uwI4HLjWMnCMl/FNkneBKHHBykVevoNDzFFdQ=; fh=TiEWcqMcKpHk5s7uErzpntoONrNfOXwKpI5P8bIlggk=; b=L9BO4JDEFr0rAKCMWLPhKlYPlhM8rg97Uoc+O1CD0HzSmKUIELQU94roSXhYy9qxL1 gP6Gd63UdYGMnaDlhUtXzU9UU/9xYajEa6IVH/uciYHh70MMIdGEeQEiUcrKAoT4k60V R0MsSu/+j9aydqxXqlAfFKun5Y9oKWKLzgKsN812AL3D2WUszOx37HV7xSfZrUiqUwyW iSGnIA/QbC3qJoUBeftkdp3TGzcGbiwRg9ZxvktD03xvxbCeNgY793QyVhF42i1+WaU0 YtPt9iZNnw7JsIJvqkKPOuXby25vUOmJb6KaWJSgvuaGy21zFLGZRAD3/LHa7rN15Plf jMwg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=VFuHxN0W; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.126.134 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org Received: from mout.kundenserver.de (mout.kundenserver.de. [212.227.126.134]) by gmr-mx.google.com with ESMTPS id k21-20020ac24f15000000b00511a71805a8si466344lfr.8.2024.02.21.00.22.25 for <swupdate@googlegroups.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 00:22:25 -0800 (PST) Received-SPF: pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.126.134 as permitted sender) client-ip=212.227.126.134; X-UI-Sender-Class: 55c96926-9e95-11ee-ae09-1f7a4046a0f6 Received: from paperino.fritz.box ([88.217.136.221]) by mrelayeu.kundenserver.de (mreue011 [213.165.67.97]) with ESMTPSA (Nemesis) id 1N1Oo7-1qx5WF2so7-012nxB; Wed, 21 Feb 2024 09:22:24 +0100 From: Stefano Babic <stefano.babic@swupdate.org> To: swupdate@googlegroups.com Cc: Stefano Babic <stefano.babic@swupdate.org> Subject: [swupdate] [PATCH 07/13] Export run_prepost_script to other modules Date: Wed, 21 Feb 2024 09:22:15 +0100 Message-Id: <20240221082221.11997-8-stefano.babic@swupdate.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240221082221.11997-1-stefano.babic@swupdate.org> References: <20240221082221.11997-1-stefano.babic@swupdate.org> MIME-Version: 1.0 X-Provags-ID: V03:K1:jEOifenDCPHrfVZqd0x7P3J8gEZq1hQS1OepEZ6oVrR7aLvnCAb r0W1/r/U85qrqxzz4EhIK+xo3tmD18DzMY+McQwZXSAdiXMlT5186jGntGq+L4g6gntQDJ+ DBWpRD2o9vu0fjRvaWoVt3lklQj1NqUv2ukF3tv71cFN7YXg6S8yng0BSlc0j04Jo5WUosC KnZdda2Cf6gYzmSCT7Cmw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:8L9gqnIpX+I=;gfUCJS3dHOYUnZmZe1ZTed3jWAr 9JgXuI/LT7R3lI1bjJ8SmbSEtrNnYt3NlHPVccgHAowKQph3A/5xjCoyED7ft1SZadf+ft/yH XHaaii13xQh4zvS5u1i+1uxICSbJhzf0yav0XULeEe06zotlq0f3F5XK7YXV/YeMW38lqL9Nv 8hB7KRY0GOPgQnBjt9G2aMDEXsxcq192+E2PU7XNcuBUw6knQUaClT6qoWfMV2cEGWduUvkWq k2QTKgq0U1e7yUrjEiI3Y6Gl5yhXfFprw4Wf5/nECiabF3akd7z2mq/8og5QaVeM3mF/5D10D a5+s9TdtgqSo2E9qjjneVosfwOk9Yy2out4jGGHEzG/IVTvO0IEQQqYltjbIgZLKIBWyDkZpc /HlovSjLZvmwSQ6ff/RQLGYptZ2zggaA6Uz6scduMpWZ8ptuBDEA5q1y+myCjQzyOgAtDKeWa xSTAN+Id6l5qJ50WjvupAuMzM5+iXCaw8Bx66JsmVrKqX3AdDJhVO5tmh5jxvZ4DfWnvW/YHG mEF3Xudho8pk7T5+jwNQ12ccZTABa8l0+KRLdm7FH+zA2FbJ9lQUbUUZK570OcBLp7Pn4QtDT 8WnpHeeItBKv/QtPVS5UG9eRQBjLKDkHdcCLOTMGiGfG3qk8mvKBredUp7nRXRtBPj8nLWfse GNMcc0ygsJHi/icN7/k/suV5EHZyk5zGaQsEh94OQSYDZeQkwvNAVjkZW74q4gTSCy3IducAC hy3nEU4r3YwZteHj4bZSh86mPUpKwmUF0/yDqyisVcJSppVuU8DRXU= X-Original-Sender: stefano.babic@swupdate.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=VFuHxN0W; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.126.134 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
Extend Lua Environemnt and post-failure scripts
|
expand
|
diff --git a/core/installer.c b/core/installer.c index 2b85a6e7..f2fbbcab 100644 --- a/core/installer.c +++ b/core/installer.c @@ -216,7 +216,7 @@ static int update_swupdate_vars(struct swupdate_cfg *cfg, const char *script) return ret; } -static int run_prepost_scripts(struct imglist *list, script_fn type) +int run_prepost_scripts(struct imglist *list, script_fn type) { int ret; struct img_type *img; diff --git a/include/installer.h b/include/installer.h index 613ecc71..aad77097 100644 --- a/include/installer.h +++ b/include/installer.h @@ -21,4 +21,5 @@ int install_single_image(struct img_type *img, bool dry_run); int install_from_file(const char *filename, bool check); int postupdate(struct swupdate_cfg *swcfg, const char *info); int preupdatecmd(struct swupdate_cfg *swcfg); +int run_prepost_scripts(struct imglist *list, script_fn type); void cleanup_files(struct swupdate_cfg *software);
Function is generic and just accept a list of scripts. Export it to let be called outside the install_images() function. Signed-off-by: Stefano Babic <stefano.babic@swupdate.org> --- core/installer.c | 2 +- include/installer.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) -- 2.34.1