Răsfoiți Sursa

Enable use of DHCPRELEASE

JDierkse 5 zile în urmă
părinte
comite
988c969985
1 a modificat fișierele cu 4 adăugiri și 0 ștergeri
  1. 4 0
      net-dhcp/udhcpc.py

+ 4 - 0
net-dhcp/udhcpc.py

@@ -8,6 +8,8 @@ from os import path
 from select import select
 import threading
 import subprocess
+import signal
+import time
 import logging
 
 from eventfd import EventFD
@@ -135,6 +137,8 @@ class DHCPClient:
             if self.once:
                 self.await_ip()
             else:
+                os.kill(self.proc.pid, signal.SIGUSR2)
+                time.sleep(0.05)
                 self.proc.terminate()
 
             if self.proc.wait(timeout=timeout) != 0: