From 5cba9ab702024d6378e7d66164628c1a667bb991 Mon Sep 17 00:00:00 2001 From: hkosaka Date: Tue, 22 Oct 2013 11:05:06 +0000 Subject: [PATCH] 2013-10-22 Hirofumi Kosaka * util/pandora_migrate_plugins.pl: Added optional command-line argument 'dbport' for people who use non-standard DB port. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8946 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/util/pandora_migrate_plugins.pl | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 38abcba4ac..f00510b6c5 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2013-10-22 Hirofumi Kosaka + + * util/pandora_migrate_plugins.pl: Added optional command-line + argument 'dbport' for people who use non-standard DB port. + 2013-10-22 Hirofumi Kosaka * lib/PandoraFMS/Core.pm: Fixed missing macro replacing in diff --git a/pandora_server/util/pandora_migrate_plugins.pl b/pandora_server/util/pandora_migrate_plugins.pl index ecd1e65d09..7887a7afdd 100755 --- a/pandora_server/util/pandora_migrate_plugins.pl +++ b/pandora_server/util/pandora_migrate_plugins.pl @@ -109,8 +109,7 @@ sub pandora_load_credentials ($) { $conf{'dbhost'} = $ARGV[1]; $conf{'dbuser'} = $ARGV[2]; $conf{'dbpass'} = $ARGV[3]; - $conf{'dbport'} = 0; - + $conf{'dbport'} = ($#ARGV >= 4 ? $ARGV[4] : 0); } ############################################################################## @@ -119,7 +118,7 @@ sub pandora_load_credentials ($) { sub help_screen{ print "\n[ERROR] No valid arguments\n\n"; - print "Usage: \n\n$0 \n\n"; + print "Usage: \n\n$0 []\n\n"; exit; }