Bug 449142 - bad init script (unquoted $1 and == in comparison)
bad init script (unquoted $1 and == in comparison)
Product: Fedora
Classification: Fedora
Component: avahi (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Lennart Poettering
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-05-30 14:37 EDT by Doncho N. Gunchev
Modified: 2008-12-13 05:57 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-12-13 05:57:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Doncho N. Gunchev 2008-05-30 14:37:46 EDT
Description of problem:
The init script /etc/init.d/avahi-daemon starts contains:
--- cut ---
if [ $1 == 'status' ]; then
--- cut ---
There are two problems with that - "$1" is unquoted (quoted later in the case
statement) and the use of '==' (the script shebang is "#! /bin/sh, not #!/bin/bash).

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. less /etc/init.d/avahi-daemon
2. /etc/init.d/avahi-daemon # you'll see the error, give no argument

Additional info:
I think this is quite easy fix :-)
Comment 1 Bug Zapper 2008-11-26 05:48:08 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 2 Doncho N. Gunchev 2008-12-09 05:10:24 EST
The '$1' problem got fixed in Fedora 10, but '/bin/bash' is needed for '==' in comparison (or '=' with '/bin/sh').
Comment 3 Lennart Poettering 2008-12-13 05:57:23 EST
Fixed in rawhide.

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