refs #535 Escape some characters in samba perl execution
parent
f02f60a114
commit
e7a88d5f01
|
@ -755,7 +755,7 @@ def smbConfigure():
|
|||
with open(os.path.join(SAMBACFGDIR, 'smb-ogboot.conf'), 'w') as conf_file:
|
||||
conf_file.write(replaced_template)
|
||||
# Configurar y recargar Samba"
|
||||
subprocess.run(["perl", "-pi", "-e", "s/WORKGROUP/OPENGNSYS/; s/server string \=.*/server string \= ogBoot Samba Server/", f"{SAMBACFGDIR}/smb.conf"])
|
||||
subprocess.run(["perl", "-pi", "-e", "s/WORKGROUP/OPENGNSYS/; s/server string \\=.*/server string \\= ogBoot Samba Server/", f"{SAMBACFGDIR}/smb.conf"])
|
||||
if "smb-ogboot" not in open(f"{SAMBACFGDIR}/smb.conf").read():
|
||||
with open(f"{SAMBACFGDIR}/smb.conf", "a") as file:
|
||||
file.write(f"include = {SAMBACFGDIR}/smb-ogboot.conf\n")
|
||||
|
|
Loading…
Reference in New Issue