1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

selftest/Samba4: setup "state dir" and "cache dir"

metze
This commit is contained in:
Stefan Metzmacher 2011-07-12 13:12:50 +02:00
parent c0eb56d159
commit 1c5390e39f
2 changed files with 22 additions and 0 deletions

View File

@ -597,6 +597,18 @@ sub write_clientconf($$$)
mkdir("$clientdir/lockdir", 0777); mkdir("$clientdir/lockdir", 0777);
} }
if ( -d "$clientdir/statedir" ) {
unlink <$clientdir/statedir/*>;
} else {
mkdir("$clientdir/statedir", 0777);
}
if ( -d "$clientdir/cachedir" ) {
unlink <$clientdir/cachedir/*>;
} else {
mkdir("$clientdir/cachedir", 0777);
}
# this is ugly, but the ncalrpcdir needs exactly 0755 # this is ugly, but the ncalrpcdir needs exactly 0755
# otherwise tests fail. # otherwise tests fail.
my $mask = umask; my $mask = umask;
@ -627,6 +639,8 @@ sub write_clientconf($$$)
print CF " print CF "
private dir = $clientdir/private private dir = $clientdir/private
lock dir = $clientdir/lockdir lock dir = $clientdir/lockdir
state dir = $clientdir/statedir
cache dir = $clientdir/cachedir
ncalrpc dir = $clientdir/ncalrpcdir ncalrpc dir = $clientdir/ncalrpcdir
name resolve order = file bcast name resolve order = file bcast
panic action = $RealBin/gdb_backtrace \%PID\% panic action = $RealBin/gdb_backtrace \%PID\%

View File

@ -510,6 +510,8 @@ sub provision_raw_prepare($$$$$$$$$$)
$ctx->{privatedir} = "$prefix_abs/private"; $ctx->{privatedir} = "$prefix_abs/private";
$ctx->{ncalrpcdir} = "$prefix_abs/ncalrpc"; $ctx->{ncalrpcdir} = "$prefix_abs/ncalrpc";
$ctx->{lockdir} = "$prefix_abs/lockdir"; $ctx->{lockdir} = "$prefix_abs/lockdir";
$ctx->{statedir} = "$prefix_abs/statedir";
$ctx->{cachedir} = "$prefix_abs/cachedir";
$ctx->{winbindd_socket_dir} = "$prefix_abs/winbindd_socket"; $ctx->{winbindd_socket_dir} = "$prefix_abs/winbindd_socket";
$ctx->{winbindd_privileged_socket_dir} = "$prefix_abs/winbindd_privileged_socket"; $ctx->{winbindd_privileged_socket_dir} = "$prefix_abs/winbindd_privileged_socket";
$ctx->{ntp_signd_socket_dir} = "$prefix_abs/ntp_signd_socket"; $ctx->{ntp_signd_socket_dir} = "$prefix_abs/ntp_signd_socket";
@ -525,6 +527,8 @@ sub provision_raw_prepare($$$$$$$$$$)
push(@{$ctx->{directories}}, $ctx->{etcdir}); push(@{$ctx->{directories}}, $ctx->{etcdir});
push(@{$ctx->{directories}}, $ctx->{piddir}); push(@{$ctx->{directories}}, $ctx->{piddir});
push(@{$ctx->{directories}}, $ctx->{lockdir}); push(@{$ctx->{directories}}, $ctx->{lockdir});
push(@{$ctx->{directories}}, $ctx->{statedir});
push(@{$ctx->{directories}}, $ctx->{cachedir});
$ctx->{smb_conf_extra_options} = ""; $ctx->{smb_conf_extra_options} = "";
@ -593,6 +597,8 @@ sub provision_raw_step1($$)
pid directory = $ctx->{piddir} pid directory = $ctx->{piddir}
ncalrpc dir = $ctx->{ncalrpcdir} ncalrpc dir = $ctx->{ncalrpcdir}
lock dir = $ctx->{lockdir} lock dir = $ctx->{lockdir}
state dir = $ctx->{statedir}
cache dir = $ctx->{cachedir}
winbindd socket directory = $ctx->{winbindd_socket_dir} winbindd socket directory = $ctx->{winbindd_socket_dir}
winbindd privileged socket directory = $ctx->{winbindd_privileged_socket_dir} winbindd privileged socket directory = $ctx->{winbindd_privileged_socket_dir}
ntp signd socket directory = $ctx->{ntp_signd_socket_dir} ntp signd socket directory = $ctx->{ntp_signd_socket_dir}
@ -686,6 +692,8 @@ nogroup:x:65534:nobody
WINBINDD_SOCKET_DIR => $ctx->{winbindd_socket_dir}, WINBINDD_SOCKET_DIR => $ctx->{winbindd_socket_dir},
NCALRPCDIR => $ctx->{ncalrpcdir}, NCALRPCDIR => $ctx->{ncalrpcdir},
LOCKDIR => $ctx->{lockdir}, LOCKDIR => $ctx->{lockdir},
STATEDIR => $ctx->{statedir},
CACHEDIR => $ctx->{cachedir},
SERVERCONFFILE => $ctx->{smb_conf}, SERVERCONFFILE => $ctx->{smb_conf},
CONFIGURATION => $configuration, CONFIGURATION => $configuration,
SOCKET_WRAPPER_DEFAULT_IFACE => $ctx->{swiface}, SOCKET_WRAPPER_DEFAULT_IFACE => $ctx->{swiface},