summaryrefslogtreecommitdiff
path: root/bin/icli
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-01-16 09:43:21 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-01-16 09:43:21 +0100
commit1525a5eef77d7993eecc4f901821adf4c30e6586 (patch)
tree6c72bac79f38671d0989c8cc7f2dc6630bc4767b /bin/icli
parent074052af599eed9bf6cc7828fbb9b15f777db70c (diff)
Honour -C in all cases
Diffstat (limited to 'bin/icli')
-rwxr-xr-xbin/icli15
1 files changed, 8 insertions, 7 deletions
diff --git a/bin/icli b/bin/icli
index 4ea6716..6765bfb 100755
--- a/bin/icli
+++ b/bin/icli
@@ -98,16 +98,16 @@ sub pretty_duration {
sub pretty_noyes {
my ($bool) = @_;
return ($bool ?
- colored('YES', 'white on_red') :
- colored('NO', 'black on_green')
+ with_colour('YES', 'white on_red') :
+ with_colour('NO', 'black on_green')
);
}
sub pretty_yesno {
my ($bool) = @_;
return ($bool ?
- colored('YES', 'black on_green') :
- colored('NO', 'white on_red')
+ with_colour('YES', 'black on_green') :
+ with_colour('NO', 'white on_red')
);
}
@@ -610,7 +610,8 @@ sub display_service {
$flags .= '!';
}
- printf(" %s%-3s%s", color('bold'), $flags, color('reset'));
+ $flags = sprintf(" %-3s", $flags);
+ print with_colour($flags, 'bold');
}
printf(" %s" , service_state($s->{'has_been_checked'}, $s->{'current_state'}));
@@ -647,10 +648,10 @@ sub display_host_services {
print q{ };
}
if ($h->{'current_state'} == 1) {
- print colored('DOWN', 'white on_red');
+ print with_colour('DOWN', 'white on_red');
}
elsif ($h->{'current_state'} == 2) {
- print colored('UNREACHABLE', 'white on_blue');
+ print with_colour('UNREACHABLE', 'white on_blue');
}
print "\n";