diff --git a/bin/netdisco-deploy b/bin/netdisco-deploy index 566592d4..32cd212e 100755 --- a/bin/netdisco-deploy +++ b/bin/netdisco-deploy @@ -77,9 +77,8 @@ This script will download the latest MAC address vendor prefix data from the Internet, and update the OUI table in the database. Hence Internet access is required to run the script. -Similarly the latest Netdisco MIB bundle is also downloaded, placed into the -user's home directory (or C<$ENV{NETDISCO_HOME}>), and Netdisco reconfigured -for its use. +Similarly the latest Netdisco MIB bundle is also downloaded and placed into +the user's home directory (or C<$ENV{NETDISCO_HOME}>). =cut @@ -99,7 +98,7 @@ print color 'reset'; my $term = Term::ReadLine->new('netdisco'); my $bool = $term->ask_yn( - prompt => 'So, is all the above in place?', default => 'n', + prompt => 'So, is all of the above in place?', default => 'n', ); exit(0) unless $bool; @@ -169,7 +168,7 @@ sub deploy_db { if ($users->search({-bool => 'admin'})->count == 0) { say ''; print color 'bold green'; - say 'We need to create a user for inital login. This user will be a full Administrator.'; + say 'We need to create a user for initial login. This user will be a full Administrator.'; say 'Afterwards, you can go to Admin -> User Management to manage users.'; print color 'reset'; say ''; @@ -274,7 +273,7 @@ sub shorten { # Remove any "the", "inc", "plc" ... $manuf - =~ s/\s(the|inc|incorporated|plc||systems|corp|corporation|s\/a|a\/s|ab|ag|kg|gmbh|co|company|limited|ltd|holding|spa)(?= )//gi; + =~ s/\s(the|inc|incorporated|plc|systems|corp|corporation|s\/a|a\/s|ab|ag|kg|gmbh|co|company|limited|ltd|holding|spa)(?= )//gi; # Convert to consistent case $manuf =~ s/(\w+)/\u\L$1/g; diff --git a/bin/netdisco-do b/bin/netdisco-do index 82baa659..fd00d83e 100755 --- a/bin/netdisco-do +++ b/bin/netdisco-do @@ -119,6 +119,9 @@ if (scalar @hostlist > 512) { exit 1; } +# some actions do not take a device parameter +@hostlist = (undef) if 0 == scalar @hostlist; + foreach my $host (@hostlist) { my $dev = $host ? get_device($host->addr) : undef; if ($dev and not (blessed $dev and $dev->in_storage) and $action !~ m/^discover/) { @@ -205,11 +208,12 @@ pass C as the first argument to C, for example C. Any action taking a C parameter can be passed either a hostname or IP -of any interface on a known or unknown device, or an IP prefix (subnet) which -will cause C to run the action for all addresses in that range. +address of any interface of a known or unknown device, or an IP prefix +(subnet) which will cause C to run the action on all addresses in +that range. -The C parameter can be passed many time. In this case, the devices would -be take in count one by one. +The C parameter may be passed multiple times. In this case, all +addresses (after expanding IP Prefixes) will be handled one by one. =head2 discover @@ -313,7 +317,7 @@ leaf with the class short name, for example "C" or "C". Using "C<::>" as the start of the prefix will test against the base "C" class. -As well, SNMP object names can be used as an argument for "C<-e>", so you can +As well, SNMP OID names can be used as an argument for "C<-e>", so you can use C for example, which will use the netdisco-mibs files for translations. @@ -421,7 +425,7 @@ following items in order: =item C<-D> -Netdisco debug log level +Netdisco debug log level. =item C<-I> or C<-II> @@ -433,7 +437,7 @@ L (net-snmp) trace level (1, 2 or 3). =item C<-Q> -L trace enabled +L trace enabled. =back