1
1
/*
2
- Copyright (c) 2012, 2017 , Oracle and/or its affiliates. All rights reserved.
2
+ Copyright (c) 2012, 2018 , Oracle and/or its affiliates. All rights reserved.
3
3
4
4
This program is free software; you can redistribute it and/or modify
5
5
it under the terms of the GNU General Public License as published by
@@ -1301,7 +1301,16 @@ function getStopProcessCommands(process) {
1301
1301
sc . addopt ( "--ndb-connectstring" , getConnectstring ( ) ) ;
1302
1302
sc . addopt ( "--execute" , "shutdown" ) ;
1303
1303
sc . progTitle = "Running ndb_mgm -e shutdown to take down cluster" ;
1304
-
1304
+ //This is CLIENT command thus probably in /usr/bin and not /usr/sbin
1305
+ //(default install directory) so we have to use autocomplete.
1306
+ if ( ! isWin ) {
1307
+ var instDir = sc . msg . file . path ;
1308
+ //NO path prefix!
1309
+ sc . msg . file . path = '' ;
1310
+ //Look for ndb_mgm in InstallDirectory, /usr/bin' and in PATH.
1311
+ sc . msg . file . autoComplete = [ instDir , '/usr/bin/' , '' ] ;
1312
+ }
1313
+ //mcc.util.dbg("SC for ndb_mgm is " + sc + ".");
1305
1314
if ( ! isWin ) {
1306
1315
sc . isDone = function ( )
1307
1316
{ return mcc . gui . getStatii ( nodeid ) == "UNKNOWN" } ;
@@ -1319,6 +1328,16 @@ function getStopProcessCommands(process) {
1319
1328
getEffectiveInstanceValue ( process , "Socket" ) ) ) ;
1320
1329
sc . progTitle = "mysqldadmin shutdown on node " + nodeid ;
1321
1330
sc . nodeid = nodeid ;
1331
+ //This is CLIENT command thus probably in /usr/bin and not /usr/sbin
1332
+ //(default install directory) so we have to use autocomplete.
1333
+ if ( ! isWin ) {
1334
+ var instDir = sc . msg . file . path ;
1335
+ //NO path prefix!
1336
+ sc . msg . file . path = '' ;
1337
+ //Look for mysqladmin in InstallDirectory, /usr/bin' and in PATH.
1338
+ sc . msg . file . autoComplete = [ instDir , '/usr/bin/' , '' ] ;
1339
+ }
1340
+ //mcc.util.dbg("SC for mysqladmin is " + sc + ".");
1322
1341
if ( ! isWin ) {
1323
1342
sc . isDone = function ( )
1324
1343
{ return mcc . gui . getStatii ( nodeid ) == "NO_CONTACT" } ;
0 commit comments