diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2008-07-25 17:01:28 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2008-07-25 17:01:28 +0000 |
commit | 9505189f6216c39511321dd1b5d6faf7c8819a5e (patch) | |
tree | fc56b4e8056c571b6da8e9cef9e7c7c6001babe1 /hardware-models | |
parent | 46c7af2ac216bfce7c55347ee2ecea3d391abfa7 (diff) | |
download | sitesummary-9505189f6216c39511321dd1b5d6faf7c8819a5e.tar.gz sitesummary-9505189f6216c39511321dd1b5d6faf7c8819a5e.tar.bz2 sitesummary-9505189f6216c39511321dd1b5d6faf7c8819a5e.tar.xz |
Make sure to report model count also when -l isn't used.
Diffstat (limited to 'hardware-models')
-rwxr-xr-x | hardware-models | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/hardware-models b/hardware-models index 3cb857d..ebdc390 100755 --- a/hardware-models +++ b/hardware-models @@ -63,14 +63,14 @@ sub print_summary { printf " %s %s/%s %s\n", $hostname, $vendor, $model, $hostid; } } - for my $model (sort keys %{$models{$vendor}}) { - printf(" %-23s %5d\n", $model, $models{$vendor}{$model}); - if (exists $opts{l}) { - for my $hostid (sort @{$modelmap{$vendor}{$model}}) { - my $hostname = get_hostname($hostid); - my ($vendor, $model, undef) = get_hardware_info($hostid); - printf " %s %s/%s %s\n", $hostname, $vendor, $model, $hostid; - } + } + for my $model (sort keys %{$models{$vendor}}) { + printf(" %-23s %5d\n", $model, $models{$vendor}{$model}); + if (exists $opts{l}) { + for my $hostid (sort @{$modelmap{$vendor}{$model}}) { + my $hostname = get_hostname($hostid); + my ($vendor, $model, undef) = get_hardware_info($hostid); + printf " %s %s/%s %s\n", $hostname, $vendor, $model, $hostid; } } } |