You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2010/03/11 21:42:35 UTC
svn commit: r922014 - in /incubator/trafficserver/traffic/branches/2.0.x:
STATUS rc/trafficserver.in
Author: zwoop
Date: Thu Mar 11 20:42:35 2010
New Revision: 922014
URL: http://svn.apache.org/viewvc?rev=922014&view=rev
Log:
TS-225: Merge from trunk, changes for more platforms.
Modified:
incubator/trafficserver/traffic/branches/2.0.x/STATUS
incubator/trafficserver/traffic/branches/2.0.x/rc/trafficserver.in
Modified: incubator/trafficserver/traffic/branches/2.0.x/STATUS
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/2.0.x/STATUS?rev=922014&r1=922013&r2=922014&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/2.0.x/STATUS (original)
+++ incubator/trafficserver/traffic/branches/2.0.x/STATUS Thu Mar 11 20:42:35 2010
@@ -49,14 +49,6 @@ For the final 2.0.0 ATS release, see the
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
- * package: Support more Linux distros in RC / startup script
- Trunk patch: http://svn.apache.org/viewcvs?view=rev&rev=918149
- http://svn.apache.org/viewcvs?view=rev&rev=918103
- http://svn.apache.org/viewcvs?view=rev&rev=918101
- Jira: https://issues.apache.org/jira/browse/TS-225
- Submitted by: zwoop
- +1: zwoop, georgep, pquerna, bcall
-
* build: Support platforms with pcre/pcre.h instead of pcre.h
This is already committed to trunk, as part of a massive merge from
the dev branch. I've backported just this single change, which is
Modified: incubator/trafficserver/traffic/branches/2.0.x/rc/trafficserver.in
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/2.0.x/rc/trafficserver.in?rev=922014&r1=922013&r2=922014&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/2.0.x/rc/trafficserver.in (original)
+++ incubator/trafficserver/traffic/branches/2.0.x/rc/trafficserver.in Thu Mar 11 20:42:35 2010
@@ -48,7 +48,7 @@ elif [ -e /etc/redhat-release ]; then
DISTRIB_ID="redhat" # also exists on Fedora
elif [ -e /etc/lsb-release ]; then
DISTRIB_ID="ubuntu"
-elif [ -e /etc/debian-version ]; then
+elif [ -e /etc/debian_version ]; then
DISTRIB_ID="debian" # also exists on Ubuntu
elif [ -e /etc/slackware-version ]; then
DISTRIB_ID="slackware"
@@ -114,18 +114,15 @@ fi
# Ubuntu: Load the VERBOSE setting and other rcS variables
[ -f /etc/default/rcS ] && . /etc/default/rcS
+# Suse: load rc.status
+[ -f /etc/rc.status ] && . /etc/rc.status
-if [ -r /etc/rc.d/init.d/functions ]; then
# Fedora: make avail helper functions 'action', 'killproc', 'status', etc
- . /etc/rc.d/init.d/functions
-elif [ -r /lib/lsb/init-functions ]; then
+[ -f /etc/rc.d/init.d/functions ] && . /etc/rc.d/init.d/functions
+
# Ubuntu: Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
- . /lib/lsb/init-functions
-else
- echo "This script needs to be ported to this OS"
- exit 1
-fi
+[ -f /lib/lsb/init-functions ] && . /lib/lsb/init-functions
#
@@ -232,32 +229,46 @@ do_reload() {
# main
case "$1" in
start)
- if [ "$DISTRIB_ID" = "ubuntu" ] ; then
+ if [ "$DISTRIB_ID" = "ubuntu" -o "$DISTRIB_ID" = "debian" ] ; then
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
- elif [ "$DISTRIB_ID" = "fedora" ]; then
- action "Starting $prog:" forkdaemon $TC_DAEMON $TC_DAEMON_ARGS
+ elif [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat" ]; then
+ action "Starting ${TS_PACKAGE_NAME}:" forkdaemon $TC_DAEMON $TC_DAEMON_ARGS
+ elif [ "$DISTRIB_ID" = "suse" ]; then
+ echo -n "Starting ${TS_PACKAGE_NAME}"
+ startproc -p $TC_PIDFILE $TC_DAEMON $TC_DAEMON_ARGS
+ rc_status -v
else
echo "This script needs to be ported to this OS"
exit 1
fi
;;
stop)
- if [ "$DISTRIB_ID" = "ubuntu" ] ; then
+ if [ "$DISTRIB_ID" = "ubuntu" -o "$DISTRIB_ID" = "debian" ] ; then
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
- elif [ "$DISTRIB_ID" = "fedora" ]; then
- action "Stopping $prog:" killproc -p $TC_PIDFILE $TC_DAEMON
- action "Stopping $prog:" killproc -p $TM_PIDFILE $TM_DAEMON
- action "Stopping $prog:" killproc -p $TS_PIDFILE $TS_DAEMON
+ elif [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat" ]; then
+ action "Stopping ${TC_NAME}:" killproc -p $TC_PIDFILE $TC_DAEMON
+ action "Stopping ${TM_NAME}:" killproc -p $TM_PIDFILE $TM_DAEMON
+ action "Stopping ${TS_NAME}:" killproc -p $TS_PIDFILE $TS_DAEMON
+ elif [ "$DISTRIB_ID" = "suse" ]; then
+ echo -n "Stopping ${TC_NAME}"
+ killproc -p $TC_PIDFILE $TC_DAEMON
+ rc_status -v
+ echo -n "Stopping ${TM_NAME}"
+ killproc -p $TM_PIDFILE $TM_DAEMON
+ rc_status -v
+ echo -n "Stopping ${TS_NAME}"
+ killproc -p $TS_PIDFILE $TS_DAEMON
+ rc_status -v
else
echo "This script needs to be ported to this OS"
exit 1
@@ -273,7 +284,7 @@ case "$1" in
#log_end_msg $?
#;;
restart|force-reload)
- if [ "$DISTRIB_ID" = "ubuntu" ] ; then
+ if [ "$DISTRIB_ID" = "ubuntu" -o "$DISTRIB_ID" = "debian" ] ; then
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
@@ -294,24 +305,26 @@ case "$1" in
log_end_msg 1
;;
esac
- elif [ "$DISTRIB_ID" = "fedora" ]; then
+ else
+ # This is the typical process for restart
$0 'stop'
$0 'start'
- else
- echo "This script needs to be ported to this OS"
- exit 1
- fi
+ fi
;;
status)
- if [ "$DISTRIB_ID" = "fedora" ]; then
- status -p $PIDFILE $PROGRAM
- else
+ if [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat" ]; then
+ status -p $TC_PIDFILE $TC_NAME
+ elif [ "$DISTRIB_ID" = "suse" ]; then
+ echo -n "Checking for service ${DM}: "
+ checkproc -p $TC_PIDFILE $TC_NAME
+ rc_status -v
+ else
echo "This script needs to be ported to this OS"
exit 1
fi
;;
condrestart)
- if [ "$DISTRIB_ID" = "fedora" ]; then
+ if [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat" ]; then
if ! $0 'status'
then
$0 'stop'
@@ -323,12 +336,12 @@ case "$1" in
fi
;;
*)
- if [ "$DISTRIB_ID" = "ubuntu" ] ; then
- #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
- #echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ if [ "$DISTRIB_ID" = "ubuntu" -o "$DISTRIB_ID" = "debian" ] ; then
echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2
- elif [ "$DISTRIB_ID" = "fedora" ]; then
+ elif [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat" ]; then
echo "Usage: $0 {start|stop|status|restart|condrestart}"
+ elif [ "$DISTRIB_ID" = "suse" ]; then
+ echo "Usage: $0 {start|stop|restart|status}"
else
echo "This script needs to be ported to this OS"
exit 1