mirror of
https://github.com/gryf/wicd.git
synced 2026-01-03 04:14:12 +01:00
32 lines
406 B
Bash
Executable File
32 lines
406 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# pm-utils hook to handle suspend/resume properly for wicd
|
|
|
|
. "${PM_FUNCTIONS}" || . "${FUNCTIONS}"
|
|
|
|
wicd_suspend()
|
|
{
|
|
# Put wifi interface down
|
|
%LIB%suspend.py 2>/dev/null
|
|
return $NA
|
|
}
|
|
|
|
wicd_resume()
|
|
{
|
|
# Bring wifi interface back up
|
|
%LIB%autoconnect.py 2>/dev/null
|
|
return $NA
|
|
}
|
|
|
|
case "$1" in
|
|
hibernate|suspend)
|
|
wicd_suspend
|
|
;;
|
|
thaw|resume)
|
|
wicd_resume
|
|
;;
|
|
*) exit $NA
|
|
;;
|
|
esac
|
|
|