Changeset 34
- Timestamp:
- Feb 11, 2008, 9:11:57 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r33 r34 113 113 } 114 114 115 sub test_switchdb_environnement { 116 die "Switch database $KLASK_SW_FILE does not exists. Launch updatesw before this command !\n" if not -e "$KLASK_SW_FILE"; 117 } 118 119 sub test_maindb_environnement { 120 die "Main database $KLASK_DB_FILE does not exists. Launch updatedb before this command !\n" if not -e "$KLASK_DB_FILE"; 121 } 122 115 123 ### 116 124 # fast ping dont l'objectif est de remplir la table arp de la machine … … 537 545 @network = get_list_network() if not @network; 538 546 539 my $computerdb = YAML::LoadFile("$KLASK_DB_FILE"); 547 test_switchdb_environnement(); 548 549 my $computerdb = {}; 550 $computerdb = YAML::LoadFile("$KLASK_DB_FILE") if -e "$KLASK_DB_FILE"; 540 551 my $timestamp = time; 541 552 … … 708 719 sub cmd_removedb { 709 720 my @computer = @_; 710 721 722 test_maindb_environnement(); 723 711 724 my $computerdb = YAML::LoadFile("$KLASK_DB_FILE"); 712 725 … … 726 739 727 740 sub cmd_exportdb { 741 test_maindb_environnement(); 742 728 743 my $computerdb = YAML::LoadFile("$KLASK_DB_FILE"); 729 744 … … 986 1001 my @ARGV = @_; 987 1002 1003 test_switchdb_environnement(); 1004 988 1005 my $format = 'txt'; 989 1006
Note: See TracChangeset
for help on using the changeset viewer.