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:
committed by
Andrew Bartlett
parent
02f3695897
commit
c1d9167fbc
@ -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):
|
||||
|
Reference in New Issue
Block a user