summaryrefslogtreecommitdiff
path: root/pm/sleep.d/55NetworkManager
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-10-29 14:30:15 -0500
committerVictor Lowther <victor.lowther@gmail.com>2008-10-29 14:30:15 -0500
commitab813bbbc25a88c726045b53d97b3a776f0a726c (patch)
tree45f7375a924088b2c9bec82d92a87291f36e331a /pm/sleep.d/55NetworkManager
parent6c9f2959a36e608e4d1f71230a9eaaa77940c54e (diff)
Added dbus_send helper function.
This function works just like dbus-send, but returns $NA if the command fails for any reason. Also modified hooks to use dbus_send where applicable.
Diffstat (limited to 'pm/sleep.d/55NetworkManager')
-rwxr-xr-xpm/sleep.d/55NetworkManager6
1 files changed, 2 insertions, 4 deletions
diff --git a/pm/sleep.d/55NetworkManager b/pm/sleep.d/55NetworkManager
index 244e2c7..bc0cf5a 100755
--- a/pm/sleep.d/55NetworkManager
+++ b/pm/sleep.d/55NetworkManager
@@ -8,12 +8,10 @@
. "${PM_FUNCTIONS}"
-command_exists dbus-send || exit $NA
-
suspend_nm()
{
# Tell NetworkManager to shut down networking
- dbus-send --system \
+ dbus_send --system \
--dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager \
org.freedesktop.NetworkManager.sleep
@@ -22,7 +20,7 @@ suspend_nm()
resume_nm()
{
# Wake up NetworkManager and make it do a new connection
- dbus-send --system \
+ dbus_send --system \
--dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager \
org.freedesktop.NetworkManager.wake