Added dynamic bits from configure.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@330 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
e6e88b2de0
commit
0999bc2197
|
@ -72,8 +72,37 @@ my %types =
|
||||||
include => { hint => 'local/path/to/file', parse => sub { return( (int($_[0] =~ /^(.*)?$/ ) && -s $1), $1 ) } },
|
include => { hint => 'local/path/to/file', parse => sub { return( (int($_[0] =~ /^(.*)?$/ ) && -s $1), $1 ) } },
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# Minor hack to get the right values out of configure.
|
||||||
|
my $prefix = "@prefix@";
|
||||||
|
my $exec_prefix = ${prefix};
|
||||||
|
my $bindir = "${exec_prefix}/bin";
|
||||||
|
|
||||||
my @options =
|
my @options =
|
||||||
(
|
(
|
||||||
|
{
|
||||||
|
name => "ZM_PATH",
|
||||||
|
default => "$bindir",
|
||||||
|
description => "Path to the ZoneMinder executables, autogenerated do not change",
|
||||||
|
help => "The path where the ZoneMinder executables are installed is set at configure time. This is a readonly option for the purposes of distributing this information around the various binaries and scripts that need to know it. Changing this option here will tend to break things. Instead re-run configure to regenerate the path."
|
||||||
|
type => $types{abs_path},
|
||||||
|
readonly => 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name => "ZM_WEB_USER",
|
||||||
|
default => "@WEB_USER@",
|
||||||
|
description => "User name of your httpd daemon user, autogenerated do not change",
|
||||||
|
help => "The user name of your httpd daemon user is set at configure time. This is a readonly option for the purposes of distributing this information around the various binaries and scripts that need to know it. Changing this option here will tend to break things. Instead re-run configure to regenerate the user name."
|
||||||
|
type => $types{string},
|
||||||
|
readonly => 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name => "ZM_WEB_GROUP",
|
||||||
|
default => "@WEB_GROUP@",
|
||||||
|
description => "User group of your httpd daemon user, autogenerated do not change",
|
||||||
|
help => "The user group of your httpd daemon user is set at configure time. This is a readonly option for the purposes of distributing this information around the various binaries and scripts that need to know it. Changing this option here will tend to break things. Instead re-run configure to regenerate the user group."
|
||||||
|
type => $types{string},
|
||||||
|
readonly => 1,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name => "ZM_DB_SERVER",
|
name => "ZM_DB_SERVER",
|
||||||
default => "localhost",
|
default => "localhost",
|
||||||
|
@ -693,6 +722,7 @@ Press enter to continue: " );
|
||||||
|
|
||||||
foreach my $option ( @options )
|
foreach my $option ( @options )
|
||||||
{
|
{
|
||||||
|
next if ( $option->{readonly} );
|
||||||
if ( my $requires = $option->{requires} )
|
if ( my $requires = $option->{requires} )
|
||||||
{
|
{
|
||||||
my $do_option;
|
my $do_option;
|
||||||
|
@ -789,6 +819,7 @@ sub saveOptions
|
||||||
open( CONFIG, ">$config_file" ) or die( "Can't open options file: $!" );
|
open( CONFIG, ">$config_file" ) or die( "Can't open options file: $!" );
|
||||||
foreach my $option ( @options )
|
foreach my $option ( @options )
|
||||||
{
|
{
|
||||||
|
next if ( $option->{readonly} );
|
||||||
print( CONFIG "Name: $option->{name}\n" );
|
print( CONFIG "Name: $option->{name}\n" );
|
||||||
print( CONFIG "Value: $option->{value}\n" );
|
print( CONFIG "Value: $option->{value}\n" );
|
||||||
print( CONFIG "Description: $option->{description}\n" );
|
print( CONFIG "Description: $option->{description}\n" );
|
||||||
|
|
Loading…
Reference in New Issue