fix WOL in docker/jail (#6810)
* fix WOL in docker/jail add ip_address parameter to send_magic_packet if host specific. in docker/jail, WOL doesn't works due to subnet broadcast issues. * Update wake_on_lan.py lint
This commit is contained in:
parent
c53de19246
commit
b8c1bc9542
1 changed files with 5 additions and 1 deletions
|
@ -75,7 +75,11 @@ class WOLSwitch(SwitchDevice):
|
|||
|
||||
def turn_on(self):
|
||||
"""Turn the device on."""
|
||||
self._wol.send_magic_packet(self._mac_address)
|
||||
if self._host:
|
||||
self._wol.send_magic_packet(self._mac_address,
|
||||
ip_address=self._host)
|
||||
else:
|
||||
self._wol.send_magic_packet(self._mac_address)
|
||||
|
||||
def turn_off(self):
|
||||
"""Turn the device off if an off action is present."""
|
||||
|
|
Loading…
Add table
Reference in a new issue