refs #535 Escape some characters in samba perl execution
parent
c9bdb52da8
commit
02570ccb99
|
|
@ -755,7 +755,7 @@ def smbConfigure():
|
||||||
with open(os.path.join(SAMBACFGDIR, 'smb-ogboot.conf'), 'w') as conf_file:
|
with open(os.path.join(SAMBACFGDIR, 'smb-ogboot.conf'), 'w') as conf_file:
|
||||||
conf_file.write(replaced_template)
|
conf_file.write(replaced_template)
|
||||||
# Configurar y recargar Samba"
|
# 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():
|
if "smb-ogboot" not in open(f"{SAMBACFGDIR}/smb.conf").read():
|
||||||
with open(f"{SAMBACFGDIR}/smb.conf", "a") as file:
|
with open(f"{SAMBACFGDIR}/smb.conf", "a") as file:
|
||||||
file.write(f"include = {SAMBACFGDIR}/smb-ogboot.conf\n")
|
file.write(f"include = {SAMBACFGDIR}/smb-ogboot.conf\n")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue