6d18b0034b
Recent kernels have ehci-hcd split into ehci-hcd and ehci-pci, so remove both of them.
17 lines
529 B
Bash
Executable File
17 lines
529 B
Bash
Executable File
#!/bin/sh
|
|
|
|
action=$1
|
|
[ -z "$action" ] && action=suspend
|
|
|
|
if [ x"$action" == x"suspend" ]; then
|
|
nmcli nm sleep true || service NetworkManager stop
|
|
# Force interfaces down, just in case when NM didn't done it
|
|
for if in `ls /sys/class/net|grep -v "lo\|vif"`; do
|
|
ip l s $if down
|
|
done
|
|
modprobe -r uhci_hcd ehci_hcd ehci_pci
|
|
else
|
|
modprobe ehci_pci; modprobe uhci_hcd;
|
|
nmcli nm sleep false || { [ -x /bin/systemctl ] && systemctl start NetworkManager.service; } || service qubes-core-netvm start
|
|
fi
|