Update of
/cvsroot/ssic-linux/openssi/openssi-tools/distro/debian/sysv-rc/etc/init.d
In directory sc8-pr-cvs1:/tmp/cvs-serv5742/sysv-rc/etc/init.d
Added Files:
Tag: OPENSSI-DEBIAN
rc.nodedown rc.nodeup rc.sysrecover rcSSI
Log Message:
All the OpenSSI project runlevel related files. ( clusetr runlevel for
dependent nodes rcSSI.d )
--- NEW FILE: rc.nodedown ---
#! /bin/sh
#
# rc.nodedown script
# Copyright 2001 Compaq Computer Corporation
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE
# or NON INFRINGEMENT. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Questions/Comments/Bugfixes to ci-linux-devel@xxxxxxxxxxxxxxxxxxxxx
#
#
# User clean-up can go here (run on all nodes when any node goes down)
#
#
# Mark node down
#
# ignore errors since all nodes will try to do this
clusternode_setstate $1 DOWN > /dev/null 2>&1
--- NEW FILE: rc.nodeup ---
#! /bin/sh
# /etc/init.d/rc.nodeup for Debian
# Authors: Aneesh Kumar K.V ( aneesh.kumar@xxxxxxxxxxx )
#
echo "/etc/rc.d/nodeup $1 running" > /dev/console
# this is equivalent to /etc/init.d/rcS
/etc/init.d/rcSSI
# Run all the services that were started by init node
# in the same order
for i in /cluster/var/lock/subsys/L*
do
subsys=${i#/cluster/var/lock/subsys/L???}
# For now this just tells us about "all" scripts"
if grep ^${subsys}$ /etc/rc.info > /dev/null ; then
/etc/init.d/$subsys start
fi
done
clusternode_setstate $1 UP
--- NEW FILE: rc.sysrecover ---
#! /bin/sh
#
# SSI_XXX: Failover daemons here
#
echo "/etc/init.d/rc.sysrecover $1 running" > /dev/console
for i in /cluster/var/lock/subsys/L*
do
subsys=${i#/cluster/var/lock/subsys/L???}
script="/etc/init.d/$subsys"
# For now this just tells us about "all" scripts
# assume if its not in the file it is "initnode"
grep ^${subsys}$ /etc/rc.d/rc.info > /dev/null
if [ "$?" != "0" ] ; then
/etc/init.d/$subsys start
fi
done
--- NEW FILE: rcSSI ---
#! /bin/sh
#
# rcCluster Call all S??* scripts in /etc/rcCluster.d in
# numerical/alphabetical order.
#
# Adapted to openSSI cluster by Aneesh Kumar K.V
# (aneesh.kumar@xxxxxxxxxxx)
#
#
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin
# Now find out what the current and what the previous runlevel are.
runlevel=$RUNLEVEL
[ "$runlevel" = "" ] && runlevel=S
previous=$PREVLEVEL
[ "$previous" = "" ] && previous=N
export PATH runlevel previous
#
# Source defaults.
#
. /etc/default/rcS
export VERBOSE
#
# Trap CTRL-C &c only in this shell so we can interrupt subprocesses.
#
trap ":" INT QUIT TSTP
#
# Call all parts in order.
#
for i in /etc/rcSSI.d/S??*
do
# Ignore dangling symlinks for now.
[ ! -f "$i" ] && continue
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set start
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i start
;;
esac
done
#
# For compatibility, run the files in /etc/rc.boot too.
#
[ -d /etc/rc.boot ] && run-parts /etc/rc.boot
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
|
|