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 160539 Details for
Bug 244212
RHEL4: Wrong init script
[?]
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]
Patch to fix this issue
salinfo-init-scripts.patch (text/plain), 4.15 KB, created by
Prarit Bhargava
on 2007-08-02 19:44:50 UTC
(
hide
)
Description:
Patch to fix this issue
Filename:
MIME Type:
Creator:
Prarit Bhargava
Created:
2007-08-02 19:44:50 UTC
Size:
4.15 KB
patch
obsolete
>diff -urNp salinfo-0.5.orig/salinfo-0.5/salinfo-etc-init.d-salinfo_decode salinfo-0.5/salinfo-0.5/salinfo-etc-init.d-salinfo_decode >--- salinfo-0.5.orig/salinfo-0.5/salinfo-etc-init.d-salinfo_decode 2007-08-02 14:56:11.000000000 -0400 >+++ salinfo-0.5/salinfo-0.5/salinfo-etc-init.d-salinfo_decode 2007-08-02 14:59:50.000000000 -0400 >@@ -13,23 +13,16 @@ > # Source function library. > . /etc/init.d/functions > >-test -x /usr/sbin/salinfo_decode || exit 0 >- > RETVAL=0 >- >-# >-# See how we were called. >-# >- > prog="salinfo_decode" > > start() { > # Check if salinfo_decode is already running >- if [ ! -f /var/lock/subsys/salinfo_decode ]; then >+ if [ ! -f /var/lock/subsys/$prog ]; then > echo -n $"Starting $prog: " > daemon /usr/sbin/salinfo_decode_all /var/log/salinfo > RETVAL=$? >- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/salinfo_decode >+ [ $RETVAL == 0 ] && touch /var/lock/subsys/$prog > echo > fi > return $RETVAL >@@ -37,9 +30,10 @@ start() { > > stop() { > echo -n $"Stopping $prog: " >- killproc /usr/sbin/salinfo_decode >+ killproc /usr/sbin/$prog > RETVAL=$? >- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/salinfo_decode >+ echo $? >+ [ $RETVAL == 0 ] && rm -f /var/lock/subsys/$prog > echo > return $RETVAL > } >@@ -48,14 +42,15 @@ stop() { > restart() { > stop > start >-} >+} > > reload() { > restart >-} >+} > > status_at() { >- status /usr/sbin/salinfo_decode >+ status /usr/sbin/$prog >+ RETVAL=$? > } > > case "$1" in >@@ -69,7 +64,7 @@ reload|restart) > restart > ;; > condrestart) >- if [ -f /var/lock/subsys/salinfo_decode ]; then >+ if [ -f /var/lock/subsys/$prog ]; then > restart > fi > ;; >@@ -78,8 +73,7 @@ status) > ;; > *) > echo $"Usage: $0 {start|stop|restart|condrestart|status}" >- exit 1 >+ RETVAL=3 > esac > >-exit $? > exit $RETVAL >diff -urNp salinfo-0.5.orig/salinfo-0.5-rhel4/salinfo-etc-init.d-salinfod salinfo-0.5/salinfo-0.5-rhel4/salinfo-etc-init.d-salinfod >--- salinfo-0.5.orig/salinfo-0.5-rhel4/salinfo-etc-init.d-salinfod 2007-08-02 14:56:11.000000000 -0400 >+++ salinfo-0.5/salinfo-0.5-rhel4/salinfo-etc-init.d-salinfod 2007-08-02 14:59:41.000000000 -0400 >@@ -1,38 +1,28 @@ > #!/bin/bash > # >-# /etc/rc.d/init.d/salinfod >+# /etc/rc.d/init.d/salinfo_decode > # > # Starts the at daemon > # >-# chkconfig: - 95 5 >-# description: Extracts SAL erorr reports from the /proc/sal/ files and then >-# logs the information for the sysadmin to take action on >-# processname: salinfod >+# chkconfig: 345 95 5 >+# description: Runs commands scheduled by the at command at the time \ >+# specified when at was run, and runs batch commands when the load \ >+# average is low enough. >+# processname: salinfo_decode > > # Source function library. > . /etc/init.d/functions > >-test -x /usr/sbin/salinfod || exit 0 >- > RETVAL=0 >- >-# >-# See how we were called. >-# >- > prog="salinfod" >-subsys="/var/lock/subsys/salinfod" > > start() { >- # Check if salinfo_decode is already running >- pid=`pidof -o $$ -o $PPID -o %PPID -x $1 || \ >- pidof -o $$ -o $PPID -o %PPID -x ${base}` >- [ -z "$pid" ] && rm -f $subsys >- if [ ! -f "$subsys" ]; then >+ # Check if salinfo_decode is already running >+ if [ ! -f /var/lock/subsys/$prog ]; then > echo -n $"Starting $prog: " > daemon /usr/sbin/salinfod -n > RETVAL=$? >- [ $RETVAL -eq 0 ] && touch $subsys >+ [ $RETVAL == 0 ] && touch /var/lock/subsys/$prog > echo > fi > return $RETVAL >@@ -40,11 +30,10 @@ start() { > > stop() { > echo -n $"Stopping $prog: " >- killproc /usr/sbin/salinfod >+ killproc /usr/sbin/$prog > RETVAL=$? >- pid=`pidof -o $$ -o $PPID -o %PPID -x $1 || \ >- pidof -o $$ -o $PPID -o %PPID -x ${base}` >- [ $RETVAL -eq 0 -o -z "$pid" ] && rm -f $subsys >+ echo $? >+ [ $RETVAL == 0 ] && rm -f /var/lock/subsys/$prog > echo > return $RETVAL > } >@@ -53,14 +42,15 @@ stop() { > restart() { > stop > start >-} >+} > > reload() { > restart >-} >+} > > status_at() { >- status /usr/sbin/salinfod >+ status /usr/sbin/$prog >+ RETVAL=$? > } > > case "$1" in >@@ -74,7 +64,7 @@ reload|restart) > restart > ;; > condrestart) >- if [ -f "$subsys" ]; then >+ if [ -f /var/lock/subsys/$prog ]; then > restart > fi > ;; >@@ -83,8 +73,7 @@ status) > ;; > *) > echo $"Usage: $0 {start|stop|restart|condrestart|status}" >- exit 1 >+ RETVAL=3 > esac > >-exit $? > 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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 244212
: 160539