1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-11 00:59:11 +03:00

Also look in the environment for smb.conf path.

(This used to be commit 8be7d93735)
This commit is contained in:
Jelmer Vernooij
2008-04-14 19:01:32 +02:00
committed by Andrew Bartlett
parent 02f3695897
commit c1d9167fbc

View File

@ -35,12 +35,14 @@ class SambaOptions(optparse.OptionGroup):
self._configfile = arg
def get_loadparm(self):
import param
import os, param
lp = param.LoadParm()
if self._configfile is None:
lp.load_default()
else:
if self._configfile is not None:
lp.load(self._configfile)
elif os.getenv("SMB_CONF_PATH") is not None:
lp.load(os.getenv("SMB_CONF_PATH"))
else:
lp.load_default()
return lp
class VersionOptions(optparse.OptionGroup):