mirror of
https://github.com/opnsense/plugins.git
synced 2026-06-03 22:08:11 -04:00
Remove "pipes" Python module dependency (#4336)
This commit fixes the folowing warning at boot: <118>/usr/local/opnsense/scripts/OPNsense/Tinc/tincd.py:34: DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
This commit is contained in:
parent
30bf1fa72f
commit
343912e454
1 changed files with 2 additions and 2 deletions
|
|
@ -31,12 +31,12 @@
|
|||
import os
|
||||
import sys
|
||||
import glob
|
||||
import pipes
|
||||
import xml.etree.ElementTree
|
||||
import shutil
|
||||
import subprocess
|
||||
import ipaddress
|
||||
from lib import objects
|
||||
from shlex import quote
|
||||
|
||||
def write_file(filename, content, mode=0o600):
|
||||
dirname = '/'.join(filename.split('/')[0:-1])
|
||||
|
|
@ -92,7 +92,7 @@ def deploy(config_filename):
|
|||
|
||||
if_up = list()
|
||||
if_up.append("#!/bin/sh")
|
||||
if_up.append("ifconfig %s %s %s" % (interface_name, interface_family, pipes.quote(interface_address)))
|
||||
if_up.append("ifconfig %s %s %s" % (interface_name, interface_family, quote(interface_address)))
|
||||
if_up.append("configctl interface %s %s" % (interface_configd, interface_name))
|
||||
write_file("%s/tinc-up" % network.get_basepath(), '\n'.join(if_up) + "\n", 0o700)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue