Bug 425491

Summary: /etc/init.d/avahi-daemon spews if not passed any arguments
Product: [Fedora] Fedora Reporter: Tom London <selinux>
Component: avahiAssignee: Martin Bacovsky <mbacovsk>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: lpoetter
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-12-17 18:15:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tom London 2007-12-14 21:39:48 UTC
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 13:20:11 UTC
Commited upstream in r1594

Comment 2 Lennart Poettering 2007-12-17 18:15:36 UTC
Fix in Rawhide