equal
deleted
inserted
replaced
|
1 #! /usr/bin/perl -w |
|
2 # Grit Schlorke |
|
3 # zieht alle configs nacheinander |
|
4 # |
|
5 |
|
6 use strict; |
|
7 use Net::Ping; |
|
8 |
|
9 my $dirname = "/root/Configs/Hosts"; |
|
10 my $ping = Net::Ping->new("icmp"); |
|
11 |
|
12 opendir (DIR, $dirname) or die "Can't open directory: \"$dirname\": $!\n"; |
|
13 |
|
14 my $file; |
|
15 |
|
16 while (defined ($file = readdir(DIR))) { |
|
17 if ($file =~ /^\./){ next}; |
|
18 if ($file =~ /mailserver.innoserver.com/){next}; |
|
19 if ($file =~ /heinz.dd.dtele.de/){next}; |
|
20 if ($file =~ /sonne.dd.dtele.de/){next}; |
|
21 if ($file =~ /gtd15.g-t-d.de/){next}; |
|
22 if ($ping->ping($file, 3)) { |
|
23 system ("./get-config", $file) == 0 or warn "Can't get-config (returned: $? // $!)\n"; |
|
24 } |
|
25 } |
|
26 |
|
27 # vim:sts=4 sw=4 ai aw sm: |