pf-tools/pf-tools: better colors
parmelan-guest at users.alioth.debian.org
parmelan-guest at users.alioth.debian.org
Tue Dec 16 12:27:20 UTC 2014
details: http://hg.debian.org/hg/pf-tools/pf-tools/rev/44caf98ebe3e
changeset: 1397:44caf98ebe3e
user: shad
date: Tue Dec 16 13:27:15 2014 +0100
description:
better colors
diffstat:
lib/PFTools/Structqueries.pm | 2 +-
lib/PFTools/Update/ADDFILE.pm | 8 ++++----
lib/PFTools/Update/ADDMOUNT.pm | 2 +-
lib/PFTools/Update/CREATEFILE.pm | 2 +-
lib/PFTools/Update/Common.pm | 6 +++---
lib/PFTools/Update/INSTALLPKG.pm | 8 ++++----
lib/PFTools/Utils.pm | 6 +++---
7 files changed, 17 insertions(+), 17 deletions(-)
diffs (169 lines):
diff -r ccbee86be4fc -r 44caf98ebe3e lib/PFTools/Structqueries.pm
--- a/lib/PFTools/Structqueries.pm Tue Dec 16 11:12:18 2014 +0100
+++ b/lib/PFTools/Structqueries.pm Tue Dec 16 13:27:15 2014 +0100
@@ -590,7 +590,7 @@
if ( !$global_config->{PUBLIC_NETWORK}->{$vlan_name} ) {
carp colored(
qq{WARNING: unknown vlan $vlan_name on site $site_name and as a public vlan},
- q{bold yellow on_white}
+ q{bold black on_bright_yellow}
);
return;
}
diff -r ccbee86be4fc -r 44caf98ebe3e lib/PFTools/Update/ADDFILE.pm
--- a/lib/PFTools/Update/ADDFILE.pm Tue Dec 16 11:12:18 2014 +0100
+++ b/lib/PFTools/Update/ADDFILE.pm Tue Dec 16 13:27:15 2014 +0100
@@ -138,7 +138,7 @@
if ( !-f $splitsource ) {
carp colored(
qq{ERROR: $splitsource no such file or directory},
- q{bold red on_white}
+ q{bold bright_white on_red}
);
return;
}
@@ -164,7 +164,7 @@
if ( !-e $source ) {
carp colored( qq{ERROR: $source no such file or directory},
- q{bold red on_white} );
+ q{bold bright_white on_red} );
return;
}
$hash_subst->{'SOURCE'} = $source;
@@ -185,7 +185,7 @@
if ( !-f $tmp ) {
carp colored( qq{ERROR: Unable to open filtered $tmp},
- q{bold red on_white} );
+ q{bold bright_white on_red} );
return;
}
@@ -220,7 +220,7 @@
do_moveold( $dest, $options );
if ( !mk_dest_dir($dest) || !copy( $tmp, $dest ) ) {
carp colored( qq{ERROR: Unable to copy file $tmp to $dest},
- q{bold red on_white} );
+ q{bold bright_white on_red} );
return;
}
do_chownmod( $ref_section, $dest, $options );
diff -r ccbee86be4fc -r 44caf98ebe3e lib/PFTools/Update/ADDMOUNT.pm
--- a/lib/PFTools/Update/ADDMOUNT.pm Tue Dec 16 11:12:18 2014 +0100
+++ b/lib/PFTools/Update/ADDMOUNT.pm Tue Dec 16 13:27:15 2014 +0100
@@ -337,7 +337,7 @@
if ( deferredlogsystem($cmd) ) {
carp colored(
qq{ERROR: while remounting $dest with\n$add_mount->{'options'}},
- q{bold red on_white}
+ q{bold bright_white on_red}
);
return;
}
diff -r ccbee86be4fc -r 44caf98ebe3e lib/PFTools/Update/CREATEFILE.pm
--- a/lib/PFTools/Update/CREATEFILE.pm Tue Dec 16 11:12:18 2014 +0100
+++ b/lib/PFTools/Update/CREATEFILE.pm Tue Dec 16 13:27:15 2014 +0100
@@ -96,7 +96,7 @@
&& ( !mk_dest_dir($dest) || !copy( $tmp, $dest ) ) )
{
carp colored( qq{ERROR: Unable to create $dest with $tmp},
- q{bold red on_white} );
+ q{bold bright_white on_red} );
return;
}
do_chownmod( $ref_section, $dest, $options ) or return;
diff -r ccbee86be4fc -r 44caf98ebe3e lib/PFTools/Update/Common.pm
--- a/lib/PFTools/Update/Common.pm Tue Dec 16 11:12:18 2014 +0100
+++ b/lib/PFTools/Update/Common.pm Tue Dec 16 13:27:15 2014 +0100
@@ -87,12 +87,12 @@
my $newgid = getgrnam $right2;
if ( !defined $newuid ) {
carp colored( qq{ERROR: user '$right1' not in /etc/passwd},
- q{bold red on_white} );
+ q{bold bright_white on_red} );
return 1;
}
if ( !defined $newgid ) {
carp colored( qq{ERROR: group '$right2' not in /etc/group},
- q{bold red on_white} );
+ q{bold bright_white on_red} );
return 1;
}
if ( ( $uid && $uid == $newuid )
@@ -209,7 +209,7 @@
if ( deferredlogsystem($cmd) ) {
carp colored( qq{ERROR: Unable to execute [$cmd]},
- q{bold red on_white} );
+ q{bold bright_white on_red} );
return;
}
return 1;
diff -r ccbee86be4fc -r 44caf98ebe3e lib/PFTools/Update/INSTALLPKG.pm
--- a/lib/PFTools/Update/INSTALLPKG.pm Tue Dec 16 11:12:18 2014 +0100
+++ b/lib/PFTools/Update/INSTALLPKG.pm Tue Dec 16 13:27:15 2014 +0100
@@ -59,7 +59,7 @@
if ( $options->{'verbose'} ) {
carp colored(
qq{WARNING: Unable to get or no dependency for $dest},
- q{bold yellow on_white} );
+ q{bold black on_yellow} );
}
return;
}
@@ -103,13 +103,13 @@
$dest, $ref_section->{'version'} );
if ( !$available_version ) {
carp colored( qq{ERROR: Package $dest is unavailable},
- q{bold red on_white} );
+ q{bold bright_white on_red} );
return;
}
if ( defined( $ref_section->{'version'} ) && !$specified_version ) {
carp colored(
qq{ERROR: $dest ($ref_section->{'version'}) is unavailable},
- q{bold red on_white} );
+ q{bold bright_white on_red} );
return;
}
if ( !defined $installed_version ) {
@@ -194,7 +194,7 @@
)
{
carp colored( qq{ERROR: Unable to install $dest},
- q{bold red on_white} );
+ q{bold bright_white on_red} );
return;
}
}
diff -r ccbee86be4fc -r 44caf98ebe3e lib/PFTools/Utils.pm
--- a/lib/PFTools/Utils.pm Tue Dec 16 11:12:18 2014 +0100
+++ b/lib/PFTools/Utils.pm Tue Dec 16 13:27:15 2014 +0100
@@ -847,7 +847,7 @@
{
carp colored(
qq{WARNING: [$section] depends on addmount [$depend], it may not work during install!},
- q{bold yellow on_white}
+ q{bold black on_bright_yellow}
);
}
@@ -1052,7 +1052,7 @@
};
if ( $EVAL_ERROR || !$resolved_ref ) {
carp colored( qq{WARNING: Unable to resolve $match2},
- q{bold yellow on_white} );
+ q{bold black on_bright_yellow} );
}
elsif ( @{$resolved_ref} ) {
if ( $separator eq q{DUPLICATE} ) {
@@ -1155,7 +1155,7 @@
if ($EVAL_ERROR) {
carp colored(
qq{WARNING: Unable to find interface for host in vlan '$real_vlan'},
- q{bold yellow on_white}
+ q{bold black on_bright_yellow}
);
}
if ( defined $eth ) {
More information about the pf-tools-commits
mailing list