mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 06:03:28 +00:00
Allow version override https://github.com/webmin/webmin/issues/410
This commit is contained in:
@@ -2,4 +2,5 @@ view_comment=0
|
||||
view_condition=1
|
||||
view_counters=0
|
||||
ipfw=/sbin/ipfw
|
||||
version=0
|
||||
cluster_mode=0
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user