Verify shorewall-common version -- Take 3

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6747 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-07-02 17:26:35 +00:00
parent 96b0f907a5
commit f322a942d0

View File

@ -942,6 +942,7 @@ sub ensure_config_path() {
sub validate_shorewall_common() {
my $f = "$globals{SHAREDIR}/version";
fatal_error "$f does not exist" unless -f $f;
fatal_error "$f is empty" unless -s _;
open V, '<', $f or fatal_error "Cannot open $f: $!";
my $version = <V>;
close V;