17c909ec83
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
41 lines
684 B
Bash
41 lines
684 B
Bash
#! /bin/sh
|
|
#
|
|
# Copyright (c) 2014-2017 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
case "$1" in
|
|
start)
|
|
;;
|
|
|
|
stop)
|
|
. /etc/platform/platform.conf
|
|
if [[ "$subfunction" == "controller,compute"* ]]; then
|
|
# Trigger logout of iSCSI connections to avoid shutdown race condition
|
|
/sbin/iscsiadm -m node --logoutall=all
|
|
fi
|
|
touch /var/run/.sm_node_unhealthy
|
|
|
|
date >> /var/log/sm-shutdown.log
|
|
echo "Shutdown SM." >> /var/log/sm-shutdown.log
|
|
|
|
sleep 5
|
|
;;
|
|
|
|
status)
|
|
;;
|
|
|
|
restart)
|
|
;;
|
|
|
|
reload)
|
|
;;
|
|
|
|
force-reload)
|
|
;;
|
|
|
|
*)
|
|
esac
|
|
|