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 151682 Details for
Bug 188536
init script broken
[?]
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]
Updated patch
denyhosts_init.diff (text/plain), 3.81 KB, created by
Jonathan Underwood
on 2007-04-04 17:42:05 UTC
(
hide
)
Description:
Updated patch
Filename:
MIME Type:
Creator:
Jonathan Underwood
Created:
2007-04-04 17:42:05 UTC
Size:
3.81 KB
patch
obsolete
>--- denyhosts 2006-03-30 17:36:17.000000000 +0100 >+++ denyhosts2 2007-04-04 18:32:15.000000000 +0100 >@@ -1,6 +1,8 @@ > #!/bin/bash > # >-# denyhosts This shell script enables the denyhosts cron job >+# denyhosts This shell script starts the denyhosts daemon OR enables the >+# denyhosts cron job depending upon whether DAEMON = yes in >+# /etc/sysconfig/denyhosts > # > # Author: Seth Vidal <skvidal@phy.duke.edu> (original script) > # Jason Tibbitts <tibbs@math.uh.edu> (denyhost changes) >@@ -20,77 +22,122 @@ > HOSTNAME=$(hostname) > export HOSTNAME > >-CONTROL=/usr/bin/denyhosts-control > CRONLOCK=/var/lock/subsys/denyhosts.init > LOCKFILE=/var/lock/subsys/denyhosts >+ >+DHOSTS=/usr/bin/denyhosts.py >+DOPTS="--daemon --config=/etc/denyhosts.conf" >+ > RETVAL=0 > >+# Determine whether or not denyhosts is to be run as a daemon or periodically >+# by cron > [ -f /etc/sysconfig/denyhosts ] && . /etc/sysconfig/denyhosts > >+ >+# cron service functions > c_start() { >- echo -n $"Enabling denyhosts: " >- touch "$CRONLOCK" && success || failure >- RETVAL=$? >- echo >+ echo -n $"Enabling denyhosts cron service: " >+ touch "$CRONLOCK" && success || failure >+ RETVAL=$? >+ echo > } > > c_stop() { >- echo -n $"Disabling denyhosts: " >- rm -f "$CRONLOCK" && success || failure >- RETVAL=$? >- echo >+ echo -n $"Disabling denyhosts cron service: " >+ rm -f "$CRONLOCK" && success || failure >+ RETVAL=$? >+ echo > } > > c_restart() { >- c_stop >- c_start >+ c_stop >+ c_start > } > > c_condrestart() { >- [ -f "$CRONLOCK" ] && c_restart >+ [ -f "$CRONLOCK" ] && c_restart > } > > c_status() { >- if [ -f $CRONLOCK ]; then >- echo $"Denyhosts is enabled." >- RETVAL=0 >- else >- echo $"Denyhosts is disabled." >- RETVAL=3 >- fi >-} >- >-d_condrestart() { $CONTROL condrestart; RETVAL=$?; } >-d_restart() { $CONTROL restart; RETVAL=$?; } >-d_start() { $CONTROL start; RETVAL=$?; } >-d_status() { $CONTROL status; RETVAL=$?; } >-d_stop() { $CONTROL stop; RETVAL=$?; } >- >-condrestart() { if [ $DAEMON = "yes" ]; then d_condrestart; else c_restart; fi } >-restart() { if [ $DAEMON = "yes" ]; then d_restart; else c_restart; fi } >-start() { if [ $DAEMON = "yes" ]; then d_start; else c_start; fi } >-status() { if [ $DAEMON = "yes" ]; then d_status; else c_status; fi } >-stop() { if [ $DAEMON = "yes" ]; then d_stop; else c_stop; fi } >+ if [ -f $CRONLOCK ]; then >+ echo $"denyhosts cron service is enabled." >+ RETVAL=0 >+ else >+ echo $"denyhosts cron service is disabled." >+ RETVAL=3 >+ fi >+} >+ >+# daemon service functions >+d_start() { >+ echo -n $"Starting denyhosts: " >+ daemon $DHOSTS $DOPTS >+ RETVAL=$? >+ echo >+ [ $RETVAL -eq 0 ] && touch $LOCKFILE >+} >+ >+d_stop() { >+ echo -n $"Stopping denyhosts: " >+ killproc $DHOSTS >+ echo >+ [ $RETVAL -eq 0 ] && rm -f $LOCKFILE >+} >+ >+d_restart() { >+ d_stop >+ d_start >+} >+ >+d_condrestart() { >+ [ -f $LOCKFILE ] && d_restart >+} >+ >+d_status() { >+ status $DHOSTS >+ RETVAL=$? >+} > > case "$1" in >- start) >- start >- ;; >- stop) >- stop >- ;; >- restart|force-reload) >- restart >- ;; >- reload) >- ;; >- condrestart) >- condrestart >- ;; >- status) >- status >+ start) >+ if [ $DAEMON = "yes" ]; then >+ d_start; >+ else >+ c_start; >+ fi >+ ;; >+ stop) >+ if [ $DAEMON = "yes" ]; then >+ d_stop; >+ else >+ c_stop; >+ fi >+ ;; >+ restart|force-reload) >+ if [ $DAEMON = "yes" ]; then >+ d_restart; >+ else >+ c_restart; >+ fi >+ ;; >+ reload) >+ ;; >+ condrestart) >+ if [ $DAEMON = "yes" ]; then >+ d_condrestart; >+ else >+ c_restart; >+ fi >+ ;; >+ status) >+ if [ $DAEMON = "yes" ]; then >+ d_status; >+ else >+ c_status; >+ fi > ;; >- *) >+ *) > echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}" > exit 1 > esac
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 188536
:
151629
| 151682