diff options
author | root <root@riffraff.tg14.gathering.org> | 2014-04-20 02:58:05 +0200 |
---|---|---|
committer | root <root@riffraff.tg14.gathering.org> | 2014-04-20 02:58:05 +0200 |
commit | 8f4ae8e5833f0d26be5fad5160ae6ee0479b0712 (patch) | |
tree | da5089e91fbe52fd7da57a1c431c9af64f6ac8af /clients/smanagrun.pl | |
parent | 37a3b5d6ed97367989aecc875f1db1e9eb0458df (diff) | |
parent | 19cd0064816a577b72577b9f21a5a946eb746f64 (diff) |
Merge branch 'master' of https://github.com/tech-server/tgmanage
Diffstat (limited to 'clients/smanagrun.pl')
-rwxr-xr-x | clients/smanagrun.pl | 40 |
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); |