1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-14 20:23:54 +03:00

testparm: do not fail if /run/samba does not exist

testparm explicitly fails if $piddir or $lockdir does not exist.
However, the daemons which actually use these directories, will
create it on demand, there is no need to fail even simple testparm
operations if the dirs are not there.

This change lets to (pre)configure samba without bothering to
pre-create the directories which are overwise needed only to fulfil
testparm criteria.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
This commit is contained in:
Michael Tokarev
2022-04-26 16:14:38 +03:00
committed by Pavel Filipensky
parent f2ddd2f306
commit 2b65de9b32
2 changed files with 4 additions and 8 deletions

View File

@@ -145,14 +145,12 @@ class cmd_testparm(Command):
lockdir = lp.get("lockdir")
if not os.path.isdir(lockdir):
logger.error("lock directory %s does not exist", lockdir)
valid = False
logger.warning("lock directory %s does not exist", lockdir)
piddir = lp.get("pid directory")
if not os.path.isdir(piddir):
logger.error("pid directory %s does not exist", piddir)
valid = False
logger.warning("pid directory %s does not exist", piddir)
winbind_separator = lp.get("winbind separator")