aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@frank.tg14.gathering.org>2014-04-17 22:16:22 +0200
committerroot <root@frank.tg14.gathering.org>2014-04-17 22:16:22 +0200
commit91a8ed879fd0e4249dbafc7577d11f335af7808d (patch)
treea7dffc27c8985d932c5ff2ecfbebb83c9c39dd16
parentc1a1537272c3832e6fd2c8ca310d15f8b4142088 (diff)
Clean some junk from smanagrun.
-rwxr-xr-xclients/smanagrun.pl40
1 files changed, 0 insertions, 40 deletions
diff --git a/clients/smanagrun.pl b/clients/smanagrun.pl
index 4d03696..0546901 100755
--- a/clients/smanagrun.pl
+++ b/clients/smanagrun.pl
@@ -19,9 +19,7 @@ BEGIN {
}
# Tweak and check
my $password = '';
-my $timeout = 15;
my $delaytime = 30;
-my $poll_frequency = 60;
my $dbh = db_connect();
$dbh->{AutoCommit} = 0;
@@ -68,44 +66,6 @@ my $sresult = $dbh->prepare("UPDATE squeue SET updated = now(), result = ?,
my $sdelay = $dbh->prepare("UPDATE squeue SET delay = now() + delaytime, updated=now(), result = ? WHERE sysname = ?")
or die "Unable to prepae sdelay";
-## Send a command to switch and return the data recvied from the switch
-#sub switch_exec($$) {
-# my ($cmd, $conn) = @_;
-#
-# # Send the command and get data from switch
-# my @data = $conn->cmd($cmd);
-# my @lines = ();
-# foreach my $line (@data) {
-# # Remove escape-7 sequence
-# $line =~ s/\x1b\x37//g;
-# push (@lines, $line);
-# }
-#
-# return @data;
-#}
-#
-#sub switch_connect($) {
-# my ($ip) = @_;
-#
-# my $conn = new Net::Telnet( Timeout => $timeout,
-# Dump_Log => '/tmp/dumplog-queue',
-# Errmode => 'return',
-# Prompt => '/DGS-3100\#/i');
-# my $ret = $conn->open( Host => $ip);
-# if (!$ret || $ret != 1) {
-# return (undef);
-# }
-# # XXX: Just send the password as text, I did not figure out how to
-# # handle authentication with only password through $conn->login().
-# #$conn->login(»·Prompt => '/password[: ]*$/i',
-# # Name => $password,
-# # Password => $password);
-# $conn->cmd($password);
-# # Get rid of banner
-# $conn->get;
-# return ($conn);
-#}
-#
sub mylog {
my $msg = shift;
my $time = POSIX::ctime(time);