aboutsummaryrefslogtreecommitdiffstats
path: root/web/nms.gathering.org
diff options
context:
space:
mode:
authorKnut Auvor Grythe <knut@auvor.no>2015-03-31 17:15:32 +0200
committerroot <root@einstein.tg15.gathering.org>2015-03-31 17:18:21 +0200
commit6b62ed4b13be95e7eb014159ab70bbe5fe1f5a03 (patch)
tree85758a7d4f09ed81c3ea2dda45624c8a2cc57f55 /web/nms.gathering.org
parentbae936a701bd791518bf7acff2d10eb8fb6bab54 (diff)
move ssendfile.pl, it's not a webpage
Diffstat (limited to 'web/nms.gathering.org')
-rwxr-xr-xweb/nms.gathering.org/ssendfile.pl50
1 files changed, 0 insertions, 50 deletions
diff --git a/web/nms.gathering.org/ssendfile.pl b/web/nms.gathering.org/ssendfile.pl
deleted file mode 100755
index 835a966..0000000
--- a/web/nms.gathering.org/ssendfile.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/perl
-use warnings;
-use strict;
-use lib '../../include';
-use POSIX;
-
-my $delaytime = 30;
-my $poll_frequency = 60;
-
-sub mylog {
- my $msg = shift;
- my $time = POSIX::ctime(time);
- $time =~ s/\n.*$//;
- printf STDERR "[%s] %s\n", $time, $msg;
-}
-
-if ($#ARGV != 1) {
- die("Error in arguments passed\n".
- "./ssendfile.pl addr configfile\n");
-}
-
-my $ssh = nms::switch_connect_ssh($ARGV[0]);
-my $conn = $ssh->{telnet};
-if (!defined($conn)) {
- die("Could not connect to switch.\n");
-}
-
-open(CONFIG, $ARGV[1]);
-while (<CONFIG>) {
- my $cmd = $_;
- $cmd =~ s/[\r\n]+//g;
- print "Executing: `$cmd`\n";
-# if ($cmd =~ /ip ifconfig swif0 (\d{1-3}\.\d{1-3}\.\d{1-3}\.\d{1-3})/) {
-# print "New ip: $1\n";
-# $conn->cmd( String => $cmd,
-# Timeout => 3);
-# $ssh = nms::switch_connect_ssh($1);
-# $conn = $ssh->{telnet};
-# if (!defined($conn)) {
-# die "Could not connect to new ip: $1\n";
-# }
-# }
-# else {
- my @data = nms::switch_exec($cmd, $conn);
- foreach my $line (@data) {
- $line =~ s/[\r\n]+//g;
- print "$line\n";
- }
-# }
-}