refs #535 Escape some characters in samba perl execution

ogboot_debian_installer
Luis Gerardo Romero Garcia 2024-08-19 06:34:16 +02:00
parent f02f60a114
commit e7a88d5f01
1 changed files with 1 additions and 1 deletions

View File

@ -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")