Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 909546 Details for
Bug 1109094
init script fails to start/stop service
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
vcs init script
vcs_init_script (text/plain), 5.82 KB, created by
Mahendra Takwale
on 2014-06-17 11:45:08 UTC
(
hide
)
Description:
vcs init script
Filename:
MIME Type:
Creator:
Mahendra Takwale
Created:
2014-06-17 11:45:08 UTC
Size:
5.82 KB
patch
obsolete
>#!/bin/bash ># $Id: init.vcs,v 1.12 2014/05/29 18:16:51 spatanka Exp $ ># $Copyrights: Copyright (c) 2014 Symantec Corporation. ># All rights reserved. ># ># THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION AND TRADE SECRETS OF ># SYMANTEC CORPORATION. USE, DISCLOSURE OR REPRODUCTION IS PROHIBITED ># WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SYMANTEC CORPORATION. ># ># The Licensed Software and Documentation are deemed to be commercial ># computer software as defined in FAR 12.212 and subject to restricted ># rights as defined in FAR Section 52.227-19 "Commercial Computer ># Software - Restricted Rights" and DFARS 227.7202, "Rights in ># Commercial Computer Software or Commercial Computer Software ># Documentation", as applicable, and any successor regulations. Any use, ># modification, reproduction release, performance, display or disclosure ># of the Licensed Software and Documentation by the U.S. Government ># shall be solely in accordance with the terms of this Agreement. $ ># ># vcs This shell script takes care of starting and stopping ># vcs. ># ># chkconfig: 345 99 10 ># description: VCS is a Cluster Server, which is the program \ ># that provides high availability of applications. ># processname: had ># >### BEGIN INIT INFO ># Provides: vcs ># Required-Start: +llt +gab +vxfen $named ># Required-Stop: ># Default-Start: 3 4 5 ># Default-Stop: 0 6 ># Description: VERITAS Cluster Server (VCS) >### END INIT INFO > ># supported linux flavors >rhel=1; sles=2 > ># Source function library. >if [ -f /etc/rc.d/init.d/functions ]; then > . /etc/rc.d/init.d/functions > > #TODO: Fix this in RHEL7 > if [ -f "/etc/redhat-release" ]; then > redhat_release_server=$(rpm -q --queryformat "%{VERSION}" redhat-release-server) > if [ `echo ${redhat_release_server} | grep "7.*"` ]; then > _use_systemctl=0 > fi > fi > > linux_flavor="${rhel}" >else > . /etc/rc.status > linux_flavor="${sles}" >fi > ># Source vcs configuration. >if [ -f /etc/sysconfig/vcs ]; then > . /etc/sysconfig/vcs >else > ONENODE=no >fi > >VCS_CONF=${VCS_CONF:-"/etc/VRTSvcs"} >VCS_HOME=${VCS_HOME:-"/opt/VRTSvcs"} > >export PATH=$PATH:${VCS_HOME}/bin > >conf_dir=config >cmdserver="${VCS_HOME}/bin/CmdServer" >had="${VCS_HOME}/bin/had" >hastart="${VCS_HOME}/bin/hastart" >hastop="${VCS_HOME}/bin/hastop" >hasys="${VCS_HOME}/bin/hasys" >restart_sleep_time=5 >gabconfig="/sbin/gabconfig" >GREP="/bin/grep" >retry_limit=12 >RETVAL=0 >prog="VCS" > >hastart() >{ > # Check to see if this script is allowed to start vcs... > if [ "$VCS_START" != 1 ]; then > echo "This script is not allowed to start vcs. VCS_START is not set to 1." > exit 2 > fi > # Start VCS. > [ -x ${hastart} ] || exit 0 > rm -f ${VCS_CONF}/conf/${conf_dir}/.lock > echo -n "Starting ${prog}: " > ${hastart} $([ "$ONENODE" = yes ] && echo -onenode) > RETVAL=$? > if [ ${linux_flavor} -eq ${rhel} ]; then > [ $RETVAL -eq 0 ] && success $"$prog startup" || failure $"$prog startup" > else # [ ${linux_flavor} -eq ${sles} ]; then > [ $RETVAL -ne 0 ] && rc_failed > fi > > echo > [ $RETVAL -eq 0 ] && touch /var/lock/subsys/vcs > [ $RETVAL -eq 0 ] && ${cmdserver} > if [ ${linux_flavor} -eq ${sles} ]; then > rc_status -v > fi > return $RETVAL >} > >hastop() >{ > # Check to see if this script is allowed to stop vcs... > if [ "$VCS_STOP" != 1 ]; then > echo "This script is not allowed to stop vcs. VCS_STOP is not set to 1." > exit 2 > fi > # Stop VCS. > [ -x ${hastop} ] || exit 0 > echo -n "Shutting down ${prog}: " > ${hastop} -sysoffline > RETVAL=$? > if [ ${linux_flavor} -eq ${rhel} ]; then > [ $RETVAL -eq 0 ] && success $"$prog shutdown" || failure $"$prog shutdown" > else # [ ${linux_flavor} -eq ${sles} ]; then > [ $RETVAL -ne 0 ] && rc_failed > fi > # Wait max 60 seconds for Port h to close > count=0 > if [ $ONENODE != "yes" ]; then > while [ "$count" -lt "$retry_limit" ]; > do > $gabconfig -a | $GREP "Port h" > /dev/null 2>&1 > port_status=$? > count=$(expr $count + 1) > if [ $port_status -ne 0 ]; then > echo "HAD has unregistered with GAB" > break > else > echo "Confirming that HAD has unregistered with GAB (retry $count)" > sleep ${restart_sleep_time} > fi > done > if [ $port_status -eq 0 ] && [ $count -eq $retry_limit ]; then > echo "Port h is not closed even after 60 seconds. Stop script is exiting. May have impact on other services." > if [ ${linux_flavor} -eq ${rhel} ]; then > failure > else > rc_failed > fi > fi > fi > > echo > [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/vcs > ps -C had || ${cmdserver} -stop > if [ ${linux_flavor} -eq ${sles} ]; then > rc_status -v > fi > return $RETVAL >} > >hastatus() { > if [ ${linux_flavor} -eq ${rhel} ]; then > status ${had} > else # [ ${linux_flavor} -eq ${sles} ]; then > checkproc ${had} > rc_status -v > fi > > RETVAL=$? > return $RETVAL >} > ># See how we were called. >case "$1" in > start) > hastart > ;; > stop) > hastop > ;; > restart|reload) > hastop > sleep ${restart_sleep_time} > hastart > RETVAL=$? > ;; > condrestart) > if [ -f /var/lock/subsys/vcs ]; then > hastop > sleep ${restart_sleep_time} > hastart > RETVAL=$? > fi > ;; > status) > hastatus > RETVAL=$? > ;; > *) > echo $"Usage: $0 {start|stop|restart|condrestart|status}" > exit 1 >esac > >exit $RETVAL
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1109094
:
909387
| 909546 |
909558