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 316304 Details for
Bug 461747
rhn-proxy init script always gives 0 exit code
[?]
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.
[patch]
rhn-proxy init script patch
0001-Add-a-meaningful-exit-code-don-t-pretend-to-impleme.patch (text/plain), 2.51 KB, created by
Rob James
on 2008-09-10 12:24:38 UTC
(
hide
)
Description:
rhn-proxy init script patch
Filename:
MIME Type:
Creator:
Rob James
Created:
2008-09-10 12:24:38 UTC
Size:
2.51 KB
patch
obsolete
>From 8d37a7367484ad9abc6d7792b07180db8ed5eca1 Mon Sep 17 00:00:00 2001 >From: Rob James <rssjames@googlemail.com> >Date: Wed, 10 Sep 2008 13:11:49 +0100 >Subject: [PATCH] Add a meaningful exit code, don't pretend to implement reload and add condrestart > >--- > proxy/proxy/tools/rhn-proxy | 49 ++++++++++++++++++++++++------------------ > 1 files changed, 28 insertions(+), 21 deletions(-) > >diff --git a/proxy/proxy/tools/rhn-proxy b/proxy/proxy/tools/rhn-proxy >index 8ab9ea0..de3e64f 100755 >--- a/proxy/proxy/tools/rhn-proxy >+++ b/proxy/proxy/tools/rhn-proxy >@@ -1,5 +1,7 @@ > #!/bin/sh >-# /etc/rc.d/init.d/rhn-proxy >+# >+# rhn-proxy Startup script for RHN Proxy >+# > # chkconfig: - 74 26 > # description: start and stop the RHN Proxy Service > >@@ -7,34 +9,34 @@ SERVICES="squid httpd jabberd MonitoringScout" > > . /etc/init.d/functions > >+RETVAL=0 >+ > forward_services() { > ACTION="$1" > >- RET=0 > for service in $SERVICES; do > if [ -e /etc/init.d/$service ]; then > /sbin/service $service $ACTION >+ let RETVAL=$RETVAL+$? > fi >- if [ $? -gt 0 ]; then >- RET=$? >+ if [ $RETVAL -gt 0 ]; then >+ RETVAL=1 > fi > done >- return $RET > } > > reverse_services() { > ACTION="$1" > >- RET=0 > for service in $(echo $SERVICES | tac -s" "); do > if [ -e /etc/init.d/$service ]; then > /sbin/service $service $ACTION >- fi >- if [ $? -gt 0 ]; then >- RET=$? >- fi >+ let RETVAL=$RETVAL+$? >+ fi >+ if [ $RETVAL -gt 0 ]; then >+ RETVAL=1 >+ fi > done >- return $RET > } > > start() { >@@ -42,8 +44,7 @@ start() { > forward_services start > echo "Done." > >- touch /var/lock/subsys/rhn-proxy >- return 0 >+ [ $RETVAL = 0 ] && touch /var/lock/subsys/rhn-proxy > } > > stop() { >@@ -51,14 +52,19 @@ stop() { > reverse_services stop > echo "Done." > >- rm -f /var/lock/subsys/rhn-proxy >- return 0 >+ [ $RETVAL = 0 ] && rm -f /var/lock/subsys/rhn-proxy > } > > status() { > forward_services status > } > >+restart() { >+ stop >+ sleep 2 >+ start >+} >+ > case "$1" in > start) > start >@@ -69,14 +75,15 @@ case "$1" in > status) > status > ;; >- restart|reload) >- stop >- sleep 2 >- start >+ restart) >+ restart > ;; >+ condrestart) >+ [ -f /var/lock/subsys/rhn-proxy ] && restart || : >+ ;; > *) >- echo "Usage: rhn-proxy {start|stop|status|reload|restart}" >+ echo "Usage: rhn-proxy {start|stop|status|restart|condrestart}" > exit 1 > ;; > esac >-exit $? >+exit $RETVAL >-- >1.5.5.1 >
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 461747
: 316304