ae0314279f
This update addresses existing bashate and pep8 warnings in cgcs-patch, patch-alarm, and tsconfig. The bulk of these updates are style and spacing changes, such as whitespace style conventions. Story: 2003371 Task: 24433 Change-Id: I44b26d24788907bac0730a952d70ed4bafb87d90 Signed-off-by: Don Penney <don.penney@windriver.com>
28 lines
534 B
Bash
28 lines
534 B
Bash
#!/bin/bash
|
|
#
|
|
# Copyright (c) 2014 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
# Patching "goenabled" check.
|
|
# If a patch has been applied on this node, it is now out-of-date and should be rebooted.
|
|
|
|
NAME=$(basename $0)
|
|
SYSTEM_CHANGED_FLAG=/var/run/node_is_patched
|
|
|
|
logfile=/var/log/patching.log
|
|
|
|
function LOG {
|
|
logger "$NAME: $*"
|
|
echo "`date "+%FT%T.%3N"`: $NAME: $*" >> $logfile
|
|
}
|
|
|
|
if [ -f $SYSTEM_CHANGED_FLAG ]; then
|
|
LOG "Node has been patched. Failing goenabled check."
|
|
exit 1
|
|
fi
|
|
|
|
exit 0
|
|
|