Files
Lindley Vieira 51ed9820f7 Run post-install script before and after reboot
This change runs the post-install script before and after the reboot
for all reboot-required patches. And it passes an argument to the
script indicating if it is running before or after.

Also adds a pre-install and a post-install script boilerplate to make
them standard across multiple patches.

Test-Plan:
PASS: Run a patch without a post-install script.
PASS: (SX/DX) Run a RR patch with a post-install script
      running functions both before and after reboot.
PASS: Run an inservice patch with a post-install script.
PASS: A failure in the install script should fail the deploy.
PASS: Run pre-bootstrap a patch with a post-install script.
PASS: Remove a RR patch with a post-install script
      running functions both before and after reboot.

Story: 2010676
Task: 53590

Change-Id: Ib80282de17d9160a792749adba4ddcbc19cd5c38
Signed-off-by: Lindley Vieira <lindley.vieira@windriver.com>
2026-01-16 10:50:47 -05:00

19 lines
443 B
Bash

#!/bin/bash
#
# Copyright (c) 2026 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# import common functions and constants
# file in update/software/service-files/software-functions
. /etc/software/software-functions
loginfo "### Start of pre-install script ###"
# Put commands here
loginfo "### End of pre-install script ###"
exit $PATCH_STATUS_OK # in case of success
# exit $PATCH_STATUS_FAILED # in case of an error