plugins[f] = __import__(f)
+def ctdb_socket():
+
+ ret = os.getenv('CTDB_SOCKET')
+
+ if ret is None:
+ ctdb = '/usr/bin/ctdb'
+ if os.path.exists(ctdb):
+ cmd = "strings " + ctdb + " | grep -E '/ctdbd?\.socket$'"
+ p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
+ out = p.communicate()[0]
+ status = p.wait()
+ if status == 0:
+ ret = string.rstrip(out)
+ else:
+ logger.warning('Failed to find socket path in "' + ctdb +
+ '" - falling back to default')
+ else:
+ logger.warning('Failed to find "' + ctdb +
+ '" - falling back to default')
+ if ret is None:
+ ret = '/var/run/ctdb/ctdbd.socket'
+
+ return ret
+
def main():
global config, options, logger
clustering=yes
ctdb:registry.tdb=yes
private dir=!!gpfs_default_mountpoint!!/.ctdb/
+ ctdbd socket = !!|ctdb_socket()!!
security = !!|"ADS" if self.config.get("package:samba", "auth_method") == "winbind" else "USER"!!
auth methods = guest sam !!|"winbind" if self.config.get("package:samba", "auth_method") == "winbind" else ""!!