From fb2085b0c3ad25be94fcba3ee4b60e6f33741a20 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 24 Jun 2011 13:40:32 -0700 Subject: [PATCH] Support 'update' on Debian Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index f59341b7d..29fbf61a1 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -2892,7 +2892,19 @@ sub conditional_quote( $ ) { sub update_config_file( $ ) { my $annotate = shift; - my $fn = $annotate ? "$globals{SHAREDIR}/configfiles/${product}.conf.annotated" : "$globals{SHAREDIR}/configfiles/${product}.conf"; + my $fn; + + if ( -f "/usr/share/doc/${product}/default-config/${product}.conf" ) { + # + # Debian or derivative + # + $fn = $annotate ? "/usr/share/doc/${product}/default-config/${product}.conf.annotated" : "/usr/share/doc/${product}/default-config/${product}.conf"; + } else { + # + # The rest of the World + # + $fn = $annotate ? "$globals{SHAREDIR}/configfiles/${product}.conf.annotated" : "$globals{SHAREDIR}/configfiles/${product}.conf"; + } # # Deprecated options with their default values #