mirror of
https://github.com/gryf/wicd.git
synced 2025-12-28 09:22:36 +01:00
merging in a bunch of trunk changes
This commit is contained in:
@@ -17,6 +17,10 @@ wicd_start() {
|
||||
else
|
||||
echo "Starting wicd daemon..."
|
||||
wicd 2>/dev/null 1>&2
|
||||
# Activate the pm-utils sleep hook
|
||||
if [ ! -x %PMUTILS%55wicd ]; then
|
||||
chmod +x %PMUTILS%55wicd
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -28,6 +32,11 @@ wicd_stop() {
|
||||
else
|
||||
pkill -f python.*wicd-daemon.py 2>/dev/null
|
||||
fi
|
||||
# Deactivate the pm-utils sleep hook
|
||||
if [ -x %PMUTILS%55wicd ]; then
|
||||
chmod -x %PMUTILS%55wicd
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
# See how we were called and take appropriate action
|
||||
@@ -49,3 +58,4 @@ case $1 in
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
29
in/other=55wicd.in
Executable file
29
in/other=55wicd.in
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
# pm-utils hook to handle suspend/resume properly for wicd
|
||||
|
||||
. "${PM_FUNCTIONS}" || . "${FUNCTIONS}"
|
||||
|
||||
wicd_suspend()
|
||||
{
|
||||
# Put wifi interface down
|
||||
%LIB%suspend.py
|
||||
}
|
||||
|
||||
wicd_resume()
|
||||
{
|
||||
# Bring wifi interface back up
|
||||
%LIB%autoconnect.py
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
hibernate|suspend)
|
||||
wicd_suspend
|
||||
;;
|
||||
thaw|resume)
|
||||
wicd_resume
|
||||
;;
|
||||
*) exit $NA
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user