Title: [opsview] [9567] Need to allow db_install to add plugins because of opspack additions
Revision
9567
Author
tvoon
Date
2012-07-13 15:54:11 +0100 (Fri, 13 Jul 2012)

Log Message

Need to allow db_install to add plugins because of opspack additions

Modified Paths


Modified: trunk/opsview-core/bin/db_opsview
===================================================================
--- trunk/opsview-core/bin/db_opsview	2012-07-13 13:51:29 UTC (rev 9566)
+++ trunk/opsview-core/bin/db_opsview	2012-07-13 14:54:11 UTC (rev 9567)
@@ -1271,6 +1271,8 @@
 	EOF
     if [ $TEST -eq 0 ] ; then
         populate_db.pl icons || die "Cannot populate via populate_db.pl" # Inserts icons and plugins help text
+    else
+        OPSVIEW_TEST=1 populate_db.pl plugins || die "Cannot populate plugins"
     fi
 	db_import < $topdir/../import/initial_opsview.sql
 

Modified: trunk/opsview-core/bin/populate_db.pl
===================================================================
--- trunk/opsview-core/bin/populate_db.pl	2012-07-13 13:51:29 UTC (rev 9566)
+++ trunk/opsview-core/bin/populate_db.pl	2012-07-13 14:54:11 UTC (rev 9567)
@@ -65,8 +65,14 @@
         if ( $use_help{$plugin} ) {
             $command = "./$plugin --help";
         }
-        my @output = `$command`;
-        my $obj    = Opsview::Plugin->find_or_create(
+        my @output;
+        if ( $ENV{OPSVIEW_TEST} ) {
+            @output = ( "testmode!" );
+        }
+        else {
+            @output = `$command`;
+        }
+        my $obj = Opsview::Plugin->find_or_create(
             { name => $plugin },
             {
                 _onserver_ => 1,

_______________________________________________
Opsview-checkins mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-checkins

Reply via email to