From 601212d747c168ffc864f89b73dcaa1e28581d50 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Thu, 17 Apr 2008 13:59:29 +0000 Subject: [PATCH] new scripts for checking fai_server and fai_release git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10543 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/tests/sqlite-check-fai-release.pl | 44 +++++++++++++++++++++++ gosa-si/tests/sqlite-check-fai-server.pl | 44 +++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100755 gosa-si/tests/sqlite-check-fai-release.pl create mode 100755 gosa-si/tests/sqlite-check-fai-server.pl diff --git a/gosa-si/tests/sqlite-check-fai-release.pl b/gosa-si/tests/sqlite-check-fai-release.pl new file mode 100755 index 000000000..efb73d61a --- /dev/null +++ b/gosa-si/tests/sqlite-check-fai-release.pl @@ -0,0 +1,44 @@ +#!/usr/bin/perl +#=============================================================================== +# +# FILE: DBD-SQlite.pl +# +# USAGE: ./DBD-SQlite.pl +# +# DESCRIPTION: +# +# OPTIONS: --- +# REQUIREMENTS: --- +# BUGS: --- +# NOTES: --- +# AUTHOR: (), <> +# COMPANY: +# VERSION: 1.0 +# CREATED: 20.12.2007 08:54:52 CET +# REVISION: --- +#=============================================================================== + +use strict; +use warnings; +use GOSA::DBsqlite; +use Data::Dumper; + +print "START\n"; +my $res; +my $db_name; + +$db_name = "/var/lib/gosa-si/fai_release.db"; +if (-e $db_name) { + print "\n############################################################\n"; + my $table_name = "fai_release"; + print "$db_name\n"; + print "$table_name\n"; + + my $sqlite = GOSA::DBsqlite->new($db_name); + my $col_names = $sqlite->get_table_columns($table_name); + print join(', ', @{ $col_names } )."\n" ; + my $answer = $sqlite->show_table($table_name); + print $answer."\n"; +} + +print "\nFINISH\n"; diff --git a/gosa-si/tests/sqlite-check-fai-server.pl b/gosa-si/tests/sqlite-check-fai-server.pl new file mode 100755 index 000000000..1d237e824 --- /dev/null +++ b/gosa-si/tests/sqlite-check-fai-server.pl @@ -0,0 +1,44 @@ +#!/usr/bin/perl +#=============================================================================== +# +# FILE: DBD-SQlite.pl +# +# USAGE: ./DBD-SQlite.pl +# +# DESCRIPTION: +# +# OPTIONS: --- +# REQUIREMENTS: --- +# BUGS: --- +# NOTES: --- +# AUTHOR: (), <> +# COMPANY: +# VERSION: 1.0 +# CREATED: 20.12.2007 08:54:52 CET +# REVISION: --- +#=============================================================================== + +use strict; +use warnings; +use GOSA::DBsqlite; +use Data::Dumper; + +print "START\n"; +my $res; +my $db_name; + +$db_name = "/var/lib/gosa-si/fai_server.db"; +if (-e $db_name) { + print "\n############################################################\n"; + my $table_name = "fai_server"; + print "$db_name\n"; + print "$table_name\n"; + + my $sqlite = GOSA::DBsqlite->new($db_name); + my $col_names = $sqlite->get_table_columns($table_name); + print join(', ', @{ $col_names } )."\n" ; + my $answer = $sqlite->show_table($table_name); + print $answer."\n"; +} + +print "\nFINISH\n"; -- 2.30.2