diff --git a/src/etc/inc/config.inc b/src/etc/inc/config.inc index fbfdd37436..7bad0dce46 100644 --- a/src/etc/inc/config.inc +++ b/src/etc/inc/config.inc @@ -170,7 +170,7 @@ function convert_config($verbose = false) $function = $verbose ? 'pass_safe' : 'mwexecf'; /* chain the new migration into this function call */ - $function('/usr/local/sbin/pluginctl -m'); + $function('/usr/local/sbin/pluginctl %s', $verbose ? '-m' : '-M'); /* register pluggable interfaces */ $function('/usr/local/sbin/pluginctl -i'); diff --git a/src/sbin/pluginctl b/src/sbin/pluginctl index 340900d099..fe5ccf6a87 100755 --- a/src/sbin/pluginctl +++ b/src/sbin/pluginctl @@ -153,7 +153,7 @@ $args = array_slice($argv, $optind); $ret = 0; if (isset($opts['h'])) { - echo "Usage: pluginctl [-4|-6|-c|-D|-d|-f|-g|-h|-I|-i|-m|-r|-q|-S|-s|-v|-X|-x] ...\n\n"; + echo "Usage: pluginctl [-4|-6|-c|-D|-d|-f|-g|-h|-I|-i|-M|-m|-r|-q|-S|-s|-v|-X|-x] ...\n\n"; echo "\t-4 IPv4 address mode, return primary address of interface\n"; echo "\t-6 IPv4 address mode, return primary address of interface\n"; echo "\t-c configure mode (default), executes plugin [_configure] hook\n"; @@ -164,7 +164,8 @@ if (isset($opts['h'])) { echo "\t-h show this help text and exit\n"; echo "\t-I information mode, lists registered device statistics\n"; echo "\t-i invoke dynamic interface registration\n"; - echo "\t-m invoke model migrations\n"; + echo "\t-M invoke model migrations in quiet mode\n"; + echo "\t-m invoke model migrations in verbose mode\n"; echo "\t-q quiet switch for configure mode\n"; echo "\t-r run mode (e.g. command)\n"; echo "\t-S service metadata dump\n"; @@ -300,8 +301,10 @@ if (isset($opts['h'])) { $payload = new ArrayObject(); } echo json_encode($payload, $jflags) . PHP_EOL; -} elseif (isset($opts['m'])) { +} elseif (isset($opts['M'])) { pass_safe('/usr/local/opnsense/mvc/script/run_migrations.php', [], $ret); +} elseif (isset($opts['m'])) { + pass_safe('/usr/local/opnsense/mvc/script/run_migrations.php -v', [], $ret); } elseif (isset($opts['v'])) { pass_safe('/usr/local/opnsense/mvc/script/run_validations.php', [], $ret); } elseif (empty($args[0])) {