Subversion Repositories sysadmin_scripts

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 4
Line 28... Line 28...
28
   return strftime '%Y-%m-%d %H:%M:%S', localtime( $time );
28
   return strftime '%Y-%m-%d %H:%M:%S', localtime( $time );
29
}
29
}
30
 
30
 
31
 
31
 
32
# read the saved state into memory if it exists
32
# read the saved state into memory if it exists
33
die "no state file found, looking at $STATEFILE\n" unless -e $STATEFILE
33
die "no state file found, looking at $STATEFILE\n" unless -e $STATEFILE;
34
 
34
 
35
my $yaml = YAML::Tiny->read( $STATEFILE );
35
my $yaml = YAML::Tiny->read( $STATEFILE );
36
%switchports = %{ $yaml->[0] };
36
%switchports = %{ $yaml->[0] };
37
 
37
 
38
foreach my $switch ( sort keys %switchports ) {
38
foreach my $switch ( sort keys %switchports ) {