Last change
on this file since 5091 was
5091,
checked in by hectorgh, 4 years ago
|
enabling wol on startup and making sure tlp doesnt' disable it
|
File size:
501 bytes
|
Line | |
---|
1 | import subprocess |
---|
2 | import os |
---|
3 | import lliurex.net |
---|
4 | |
---|
5 | class EpoptesClient: |
---|
6 | |
---|
7 | def startup(self,options): |
---|
8 | |
---|
9 | if options["controlled"]: |
---|
10 | if options["boot"]: |
---|
11 | |
---|
12 | if os.system("host server > /dev/null")==0: |
---|
13 | p=subprocess.Popen(["epoptes-client -c"],shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE) |
---|
14 | p.communicate() |
---|
15 | |
---|
16 | devices=lliurex.net.get_devices_info() |
---|
17 | |
---|
18 | for dev in devices: |
---|
19 | os.system("ethtool -s %s wol g"%dev["name"]) |
---|
20 | |
---|
21 | #def startup |
---|
22 | |
---|
23 | #class EpoptesClient |
---|
24 | |
---|
Note: See
TracBrowser
for help on using the repository browser.