Bug 425491 - /etc/init.d/avahi-daemon spews if not passed any arguments
/etc/init.d/avahi-daemon spews if not passed any arguments
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: avahi (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Martin Bacovsky
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-14 16:39 EST by Tom London
Modified: 2007-12-17 13:15 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-12-17 13:15:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tom London 2007-12-14 16:39:48 EST
Description of problem:
/etc/init.d/avahi-daemon spews if you call it without any arguments:

[root@localhost ~]# service avahi-daemon status
Avahi daemon is running
[root@localhost ~]# service avahi-daemon 
/etc/init.d/avahi-daemon: line 21: [: ==: unary operator expected
Usage: /etc/init.d/avahi-daemon {start|stop|status|restart|condrestart}
[root@localhost ~]# 

Perhaps something like the following simple patch to fix:
--- avahi-daemon.save	2007-12-14 13:34:02.000000000 -0800
+++ avahi-daemon	2007-12-14 13:34:37.000000000 -0800
@@ -18,7 +18,7 @@
 
 AVAHI_BIN=/usr/sbin/avahi-daemon
 
-if [ $1 == 'status' ]; then
+if [ "$1" == 'status' ]; then
     test -x $AVAHI_BIN || exit 4
 else 
     test -x $AVAHI_BIN || exit 5

Version-Release number of selected component (if applicable):
avahi-0.6.21-6.fc8

How reproducible:
Every time

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Lennart Poettering 2007-12-17 08:20:11 EST
Commited upstream in r1594
Comment 2 Lennart Poettering 2007-12-17 13:15:36 EST
Fix in Rawhide

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