mirror of
https://github.com/opnsense/plugins.git
synced 2025-12-10 10:30:21 -06:00
securiry/tinc: don't create symlink as it conflicts with ifconfig symlink creation (#5064)
This commit is contained in:
parent
94a21efccc
commit
61e0663137
@ -116,13 +116,13 @@ def deploy(config_filename):
|
||||
|
||||
# configure and rename new tun device, place all in group "tinc" symlink associated tun device
|
||||
if interface_name not in interfaces:
|
||||
# remove symlink from previus run (created by ifconfig) if it wasn't cleaned up properly on exit
|
||||
if os.path.islink('/dev/%s' % interface_name):
|
||||
os.remove('/dev/%s' % interface_name)
|
||||
tundev = subprocess.run(['/sbin/ifconfig', interface_type, 'create'],
|
||||
capture_output=True, text=True).stdout.split()[0]
|
||||
subprocess.run(['/sbin/ifconfig',tundev,'name',interface_name])
|
||||
subprocess.run(['/sbin/ifconfig',interface_name,'group','tinc'])
|
||||
if os.path.islink('/dev/%s' % interface_name):
|
||||
os.remove('/dev/%s' % interface_name)
|
||||
os.symlink('/dev/%s' % tundev, '/dev/%s' % interface_name)
|
||||
return networks
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user