Adding a post-install for an inservice patch to restart all services
during host install to make the changes live.
If it is the active controller, the software-controller cannot be
restarted at this time, so leaves a flag for it to be restarted during
activate step.
Test-Plan SX/DX:
PASS: Run an inservice patch with this script
and check if the changes are applied
PASS: Apply an inservice patch pre-bootstrap
Story: 2010676
Task: 52804
Change-Id: Id5b853cea0f80af6124c45aab231c44c34d65576
Signed-off-by: Lindley Vieira <lindley.vieira@windriver.com>
43 lines
765 B
Bash
43 lines
765 B
Bash
#!/bin/bash
|
|
#
|
|
# Copyright (c) 2016 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
#
|
|
# This script provides an example in-service patching restart,
|
|
# triggering a restart of the patching daemons themselves
|
|
#
|
|
|
|
#
|
|
# The patching subsystem provides a patch-functions bash source file
|
|
# with useful function and variable definitions.
|
|
#
|
|
. /etc/patching/patch-functions
|
|
|
|
#
|
|
# We can now check to see what type of node we're on, if it's locked, etc,
|
|
# and act accordingly
|
|
#
|
|
|
|
#
|
|
# Declare an overall script return code
|
|
#
|
|
declare -i GLOBAL_RC=$PATCH_STATUS_OK
|
|
|
|
#
|
|
# Next, handle restarting the patch-controller.
|
|
#
|
|
if is_controller
|
|
then
|
|
/usr/sbin/sw-patch-controller-daemon-restart
|
|
fi
|
|
|
|
|
|
#
|
|
# Exit the script with the overall return code
|
|
#
|
|
exit $GLOBAL_RC
|
|
|