Bug 428440 - Denyhosts fails to start from control script
Summary: Denyhosts fails to start from control script
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: denyhosts
Version: 8
Hardware: i686
OS: Linux
low
low
Target Milestone: ---
Assignee: Jason Tibbitts
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-01-11 15:45 UTC by Matt Castelein
Modified: 2008-01-14 20:04 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-01-14 20:04:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
denyhosts init script (4.04 KB, text/plain)
2008-01-12 17:00 UTC, Matt Castelein
no flags Details

Description Matt Castelein 2008-01-11 15:45:41 UTC
Description of problem: Denyhosts fails to start from control script


Version-Release number of selected component (if applicable):
denyhosts-2.6-7.fc8

How reproducible: Always


Steps to Reproduce:
1. Start denyhosts service
2.
3.
  
Actual results:
[root@arturo ~]# service denyhosts start
starting DenyHosts:    /usr/bin/env python /usr/bin/denyhosts.py --daemon
--config=/etc/denyhosts.conf
Could not find environment variable: HOSTNAME


Expected results:
Denyhosts daemon starts

Additional info:

Added os.environ['HOSTNAME'] = "arturo" to /usr/bin/denyhosts-control for
temporary fix.

Comment 1 Jason Tibbitts 2008-01-12 05:03:02 UTC
I have to admit I find this odd, because that's not the expected output from the
denyhosts initscript.  First off, can you verify that /etc/init.d/denyhosts
looks like this, down after the initial comment block:

# Make sure HOSTNAME is in the environment so denyhosts can
# use it in report subjects
HOSTNAME=$(hostname)
export HOSTNAME

CRONLOCK=/var/lock/subsys/denyhosts.init
LOCKFILE=/var/lock/subsys/denyhosts

DHOSTS=/usr/bin/denyhosts.py
DOPTS="--daemon --config=/etc/denyhosts.conf"

If so, do you have a /bin/hostname executable?

If so, can you try changing the line:
  HOSTNAME=$(hostname)
in /etc/init.d/denyhosts to 
  HOSTNAME=$(/bin/hostname)
just to rule out the possiility that the initscript is somehow being called with
no PATH defined.


Comment 2 Matt Castelein 2008-01-12 17:00:25 UTC
Created attachment 291470 [details]
denyhosts init script

Comment 3 Matt Castelein 2008-01-12 17:01:43 UTC
My init script does not match that at all.. I am attaching it so you can have a
look.. I checked to see there were no .rpmnew versions of it as well.

Comment 4 Jason Tibbitts 2008-01-13 02:23:16 UTC
Well, it doesn't seem like your problem is actually with denyhosts; it looks
like either something went wrong when the package was installed or something
else is wrong with your system.

Things to try:

rpm -V denyhosts (as root, should give no output)
Make sure that /etc/init.d is a symlink to /etc/rc.d/init.d.

Uninstall and reinstall the denyhosts package.

There was a time before the release of F8 when we shipped a different
initscript; I suppose it's possible that you upgraded but the upgrade went awry
and left you with the old one somehow.

Comment 5 Matt Castelein 2008-01-14 20:04:59 UTC
Uninstall and reinstall fixed this issue.  Although the version and arch of the
removed and installed packages were identical, there was a mismatch in size.  My
init script has now been replaced with the working version.  I can only guess
that this happened when I upgraded from fedora 7 to 8.


Note You need to log in before you can comment on or make changes to this bug.