Ubuntu

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

Reported by Mike Conigliaro on 2012-05-02
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
monit (Ubuntu)
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

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.

Launchpad Janitor (janitor) wrote :

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

Changed in monit (Ubuntu):
status: New → Confirmed
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  Edit
Everyone can see this information.

Other bug subscribers