Compare commits
No commits in common. "fe70776dfc1469217f6d0d1d6ea6fcf136bd8ccc" and "b579dc492875f9785e63031675f062821a9afae0" have entirely different histories.
fe70776dfc
...
b579dc4928
5 changed files with 0 additions and 76 deletions
|
@ -1,28 +0,0 @@
|
||||||
# wake on lan
|
|
||||||
|
|
||||||
## woken
|
|
||||||
|
|
||||||
wol by magic packet
|
|
||||||
|
|
||||||
```
|
|
||||||
ethtool -s enp1s0 wol g
|
|
||||||
```
|
|
||||||
|
|
||||||
p Wake on phy activity
|
|
||||||
u Wake on unicast messages
|
|
||||||
m Wake on multicast messages
|
|
||||||
b Wake on broadcast messages
|
|
||||||
a Wake on ARP
|
|
||||||
g Wake on MagicPacket(tm)
|
|
||||||
s Enable SecureOn(tm) password for MagicPacket(tm)
|
|
||||||
d Disable (wake on nothing). This option clears all previous options.
|
|
||||||
|
|
||||||
```
|
|
||||||
systemctl suspend
|
|
||||||
```
|
|
||||||
|
|
||||||
## waker
|
|
||||||
|
|
||||||
```
|
|
||||||
wakeonlan d8:cb:8a:e7:be:c6
|
|
||||||
```
|
|
|
@ -1,45 +0,0 @@
|
||||||
@metadata_reactor.provides(
|
|
||||||
'apt/packages/ethtool',
|
|
||||||
'systemd/units/enable-wol',
|
|
||||||
'systemd/services/enable-wol.service',
|
|
||||||
)
|
|
||||||
def systemd(metadata):
|
|
||||||
interfaces = set(
|
|
||||||
conf['interface']
|
|
||||||
for conf in metadata.get('network').values()
|
|
||||||
if conf.get('wol', False)
|
|
||||||
)
|
|
||||||
|
|
||||||
if not interfaces:
|
|
||||||
return {}
|
|
||||||
|
|
||||||
return {
|
|
||||||
'apt': {
|
|
||||||
'packages': {
|
|
||||||
'ethtool': {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'systemd': {
|
|
||||||
'units': {
|
|
||||||
'enable-wol.service': {
|
|
||||||
'Unit': {
|
|
||||||
'After': 'network.target',
|
|
||||||
},
|
|
||||||
'Service': {
|
|
||||||
'Type': 'oneshot',
|
|
||||||
'RemainAfterExit': 'yes',
|
|
||||||
'ExecStart': set(
|
|
||||||
f"ethtool -s {conf['interface']} wol g"
|
|
||||||
for itnerface in interfaces
|
|
||||||
),
|
|
||||||
},
|
|
||||||
'Install': {
|
|
||||||
'WantedBy': 'multi-user.target',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'services': {
|
|
||||||
'enable-wol.service': {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -3,7 +3,6 @@ defaults = {
|
||||||
'zfs-mirror': {
|
'zfs-mirror': {
|
||||||
'command': '/opt/zfs-mirror',
|
'command': '/opt/zfs-mirror',
|
||||||
'when': 'daily',
|
'when': 'daily',
|
||||||
'persistent': True,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
'bundles': {
|
'bundles': {
|
||||||
'hardware',
|
'hardware',
|
||||||
'wol-sleeper',
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
'interface': 'enp1s0',
|
'interface': 'enp1s0',
|
||||||
'ipv4': '10.0.0.5/24',
|
'ipv4': '10.0.0.5/24',
|
||||||
'gateway4': '10.0.0.1',
|
'gateway4': '10.0.0.1',
|
||||||
'wol': True,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'backup-server': {
|
'backup-server': {
|
||||||
|
|
Loading…
Reference in a new issue