Bug #28233 ./mysqlnetworkctl.sh poor usability
Submitted: 4 May 2007 9:46 Modified: 17 Dec 2007 16:18
Reporter: Johan Idrén Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Installing Severity:S4 (Feature request)
Version:1.1.0/1.0.x OS:Linux
Assigned to: BitRock Merlin CPU Architecture:Any

[4 May 2007 9:46] Johan Idrén
Description:
Not providing mysqlnetworkctl.sh with a valid does not return any error or hints as to which commands/options are valid.

How to repeat:
[root@localhost monitoring]# ./mysqlnetworkctl.sh foo
[root@localhost monitoring]# 

Suggested fix:
Make mysqlnetworkctl.sh return either an error or the help/usage output, for example

[root@localhost monitoring]# ./mysqlnetworkctl.sh foo
mysqlnetworkctl.sh: unknown option 'foo'
usage: ./mysqlnetworkctl.sh help
       ./mysqlnetworkctl.sh (start|stop|restart)
       ./mysqlnetworkctl.sh (start|stop|restart) mysql
       ./mysqlnetworkctl.sh (start|stop|restart) tomcat
       ./mysqlnetworkctl.sh (start|stop|restart) apache

help       - this screen
start      - start the service(s)
stop       - stop  the service(s)
restart    - restart or start the service(s)
[4 May 2007 9:48] Mark Leith
Missing:

'else help'

Before the last fi within the file...

Assigning to Bitrock as one of their files. 

Cheers

Mark
[22 May 2007 18:12] BitRock Merlin
Patch sent to Keith.
[25 May 2007 19:17] Keith Russell
Corrected in versions => 1.1.1.5725
[29 May 2007 15:11] Carsten Segieth
tested OK with 1.1.1.5736
[30 May 2007 14:28] Peter Lavin
Added to the changelog.
[30 May 2007 15:29] Carsten Segieth
re-opened, as the fix is not applied during update install. So after updating to current 1.1.1.5736 a mistyped option is not detected:

$ ./mysqlnetworkctl.sh startapache
$ ./mysqlnetworkctl.sh stxart apache

configuration_report.txt:
MySQL Network Monitoring and Advisory Service (Version 1.1.1.5214 : 20070419_202735_v1.1.1.5214)
Here are the settings ...
...
Updated to MySQL Network Service Manager Update (Version 1.1.1.5336 : 20070501_182006_v1.1.1.5336)
Updated to MySQL Network Service Manager Update (Version 1.1.1.5646 : 20070521_191224_v1.1.1.5646)
Updated to MySQL Network Service Manager Update (Version 1.1.1.5736 : 20070526_154325_v1.1.1.5736)
[30 May 2007 19:40] Bill Weber
The mysqlnetworkctl.bat is also not getting modified with the
latest changes during the update install. For example, the "help" and "restart"
options are not added.
[5 Jun 2007 16:26] BitRock Merlin
Patch sent to Keith
[20 Jun 2007 16:13] Keith Russell
Corrections installed in versions => 1.2.0.6043.
[17 Dec 2007 12:02] Carsten Segieth
tested both fresh and update OK with 1.3.0.8528
[17 Dec 2007 16:18] Peter Lavin
Added to the changelog for version 1.2.

Documented as follows:

Providing an invalid argument to mysqlnetworkctl.sh or mysqlnetworkctl.bat did not return an error or a usage message. Nor was this file changed when an update installation was performed. This file is now changed with an update installation              and an invalid argument produces a usage message. (Bug#28233)