blob: 1866d5165e38bc5420a5ce349474b3e819eedb24 (
plain) (
tree)
|
|
#!/bin/bash
# -----------------------------------------------------------------------------
# Copyright (c) 2010 - RZ Uni FR
# Copyright (c) 2010 - 2012 OpenSLX GmbH
#
# This program is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
#
# If you have any feedback please consult http://openslx.org/feedback and
# send your suggestions, praise, or complaints to feedback@openslx.org
#
# General information about OpenSLX can be found at http://openslx.org/
# -----------------------------------------------------------------------------
# shutdown
# - Script which prepares for SYSRQ shutdown
################################################################################
. /etc/opt/openslx/openslx.conf
################################################################################
### Define default dirs / get configs
################################################################################
PLUGINCONFROOT=${OPENSLX_DEFAULT_CONFDIR}/plugins
PLUGINCONFSYSRQ=${PLUGINCONFROOT}/sysrqshutdown
PLUGINDIR=${OPENSLX_DEFAULT_DIR}/plugin-repo/sysrqshutdown
# include general configuration from sysrqshutdown
if [ -f ${PLUGINCONFSYSRQ}/sysrqshutdown.conf ]; then
. ${PLUGINCONFSYSRQ}/sysrqshutdown.conf
else
sysrqshutdown_active=0
fi
if [ ${sysrqshutdown_active} -eq 1 ]; then
nohup ${PLUGINDIR}/sysrqshutdown.sh $@ 2>/dev/null &
fi
exit 0
|