mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
system/trust - link location could be a file or link, but when it exists, it should be removed. fixes:
Scanning /usr/share/certs/trusted for certificates...
Scanning /usr/local/share/certs for certificates...
Traceback (most recent call last):
File "/usr/local/opnsense/scripts/system/certctl.py", line 195, in <module>
cmds[sys.argv[1]]()
File "/usr/local/opnsense/scripts/system/certctl.py", line 152, in cmd_rehash
os.symlink(src_filename, dst_filename)
FileExistsError: [Errno 17] File exists:
This commit is contained in:
parent
96a37c2763
commit
9a33aeb07e
@ -147,7 +147,7 @@ def cmd_rehash():
|
||||
f_out.write(record['data'])
|
||||
os.chmod(dst_filename, 0o644)
|
||||
else:
|
||||
if os.path.isfile(dst_filename):
|
||||
if os.path.isfile(dst_filename) or os.path.islink(dst_filename):
|
||||
os.remove(dst_filename)
|
||||
os.symlink(src_filename, dst_filename)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user