This commit is contained in:
Jamie Cameron
2016-08-13 12:23:44 -07:00
parent b08445e9c4
commit 74efe3465e
3 changed files with 12 additions and 5 deletions

View File

@@ -2,4 +2,5 @@ view_comment=0
view_condition=1
view_counters=0
ipfw=/sbin/ipfw
version=0
cluster_mode=0

View File

@@ -6,3 +6,4 @@ cluster_mode=Update cluster servers,1,0-Whenever a change is made,1-When applyin
line1=System configuration,11
save_file=IPFW save file to edit,3,Webmin's default or automatic
ipfw=Full path to ipfw command,0
version=IPFW version number,1,0-Detect automatically,1-Version 1,2-Version 2

View File

@@ -24,13 +24,18 @@ if ($?) {
}
# Get the version number
$vout = `$config{'ipfw'} 2>&1`;
$vouth = `$config{'ipfw'} -h 2>&1`;
if ($vout =~ /preproc/ || $vouth =~ /preproc/) {
$ipfw_version = 2;
if ($config{'version'}) {
$ipfw_version = $config{'version'};
}
else {
$ipfw_version = 1;
$vout = `$config{'ipfw'} 2>&1`;
$vouth = `$config{'ipfw'} -h 2>&1`;
if ($vout =~ /preproc/ || $vouth =~ /preproc/) {
$ipfw_version = 2;
}
else {
$ipfw_version = 1;
}
}
open(VERSION, ">$module_config_directory/version");
print VERSION $ipfw_version,"\n";