/etc/init.d/monit: 39: [: reload: unexpected operator

Bug #993381 reported by Mike Conigliaro
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
monit (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

# /etc/init.d/monit restart
/etc/init.d/monit: 39: [: restart: unexpected operator
/etc/init.d/monit: 39: [: stop: unexpected operator
 * Stopping daemon monitor monit [ OK ]
/etc/init.d/monit: 39: [: start: unexpected operator
 * Starting daemon monitor monit

More info here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=654449

Revision history for this message
John Eikenberry (jae) wrote :

This is due to a bashism on line 39 of the init.d script.
...
  if [ "$1" == "start" ]
...

The '==' is a bashism and not posix compliant. It should be 1 '='.

The fix is to just delete one of those equal signs. I'd submit a patch but it is to trivial to be worth the effort.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in monit (Ubuntu):
status: New → Confirmed
Revision history for this message
Sergey B Kirpichev (skirpichev) wrote :

fixed 1:5.3.2-2

Changed in monit (Ubuntu):
status: Confirmed → Fix Committed
Changed in monit (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.