Changeset 301 for trunk/klask
- Timestamp:
- Oct 4, 2017, 8:47:26 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r300 r301 7 7 use strict; 8 8 use warnings; 9 use version; our $VERSION = qv('0. 6.7');9 use version; our $VERSION = qv('0.7.0'); 10 10 11 11 use Readonly; … … 1118 1118 klask help 1119 1119 1120 klask updatedb [--verbose|-v] [--verb-description|-d] [--chk-hostname|-h] [--chk-location|-l] 1120 klask updatedb [--verbose|-v] [--verb-description|-d] [--chk-hostname|-h] [--chk-location|-l] [--no-rebuildsw|-R] 1121 1121 klask exportdb [--format|-f txt|html] 1122 1122 klask removedb IP* computer* … … 1273 1273 @ARGV = @_; 1274 1274 1275 my ($verbose, $verb_description, $check_hostname, $check_location );1275 my ($verbose, $verb_description, $check_hostname, $check_location, $no_rebuildsw); 1276 1276 1277 1277 GetOptions( … … 1280 1280 'chk-hostname|h' => \$check_hostname, 1281 1281 'chk-location|l' => \$check_location, 1282 'no-rebuildsw|-R' => \$no_rebuildsw, 1282 1283 ); 1283 1284 … … 1307 1308 my $switch_connection = YAML::Syck::LoadFile("$KLASK_SW_FILE"); 1308 1309 if ($switch_checksum ne $switch_connection->{'checksum'}) { # Verify checksum 1309 print "WARNING: switch database is going to be rebuilt\n"; 1310 update_switchdb(verbose => $verbose); 1310 if ($no_rebuildsw) { 1311 print "WARNING: switch database is outdate, please rebuild if with updatesw command\n"; 1312 else { 1313 print "WARNING: switch database is going to be rebuilt\n"; 1314 update_switchdb(verbose => $verbose) 1315 } 1311 1316 } 1312 1317 … … 3006 3011 klask help 3007 3012 3008 klask updatedb [--verbose|-v] [--verb-description|-d] [--chk-hostname|-h] [--chk-location|-l] 3013 klask updatedb [--verbose|-v] [--verb-description|-d] [--chk-hostname|-h] [--chk-location|-l] [--no-rebuildsw|-R] 3009 3014 klask exportdb [--format|-f txt|html] 3010 3015 klask removedb IP* computer* … … 3119 3124 =head2 updatedb 3120 3125 3121 klask updatedb [--verbose|-v] [--verb-description|-d] [--chk-hostname|-h] [--chk-location|-l] 3126 klask updatedb [--verbose|-v] [--verb-description|-d] [--chk-hostname|-h] [--chk-location|-l] [--no-rebuildsw|-R] 3122 3127 3123 3128 This command will scan networks and update the computer database. … … 3139 3144 The idea of the C<active> scan mode is to force computer to regulary send packet over the network. 3140 3145 3146 At the beginning, the command verify that the switch map checksum is always valid. 3147 Otherwise, a rebuild procedure will ne done automatically. 3148 3141 3149 =head2 exportdb 3142 3150 … … 3178 3186 The list of the switches must be given in the file F</etc/klask/klask.conf> (see L</CONFIGURATION>). 3179 3187 3188 The database has a checksum which depend of all the active switches. 3189 It's use when rebuilding the database in case of change in switch configuration (one more for example). 3180 3190 3181 3191 =head2 exportsw
Note: See TracChangeset
for help on using the changeset viewer.