Post a file for me?

Discussion in 'Modding and Customization' started by h0dges, Sep 25, 2008.

  1. h0dges

    h0dges

    Joined:
    Sep 9, 2008
    Messages:
    29
    Likes Received:
    0
    Hi could someone post their /usr/lib/pm-utils/sleep.d/10NetworkManager file for me where they do not have any problems with network connections after resuming for standby.

    Cheers
     
    h0dges, Sep 25, 2008
    #1
  2. h0dges

    rbil

    Joined:
    Aug 14, 2008
    Messages:
    730
    Likes Received:
    0
    Location:
    The Wet Coast, Canada
    Code:
    #!/bin/bash
    
    . /usr/lib/pm-utils/functions
    
    suspend_nm() {
        # Tell NetworkManager to shut down networking
        dbus-send --system                         \
            --dest=org.freedesktop.NetworkManager  \
            /org/freedesktop/NetworkManager        \
            org.freedesktop.NetworkManager.sleep
            killall -SIGPWR nm-applet
    }
    
    resume_nm() {
        # Wake up NetworkManager and make it do a new connection
        dbus-send --system                        \
            --dest=org.freedesktop.NetworkManager \
            /org/freedesktop/NetworkManager       \
            org.freedesktop.NetworkManager.wake
            killall -SIGUSR2 nm-applet
    }
    
    case "$1" in
            hibernate|suspend)
                    suspend_nm
                    ;;
            thaw|resume)
                    resume_nm
                    ;;
            *)
                    ;;
    esac
    
    exit $?
    
    
     
    rbil, Sep 25, 2008
    #2
  3. h0dges

    h0dges

    Joined:
    Sep 9, 2008
    Messages:
    29
    Likes Received:
    0
    Damn they're identical!

    Thanks for the fast reply :)
     
    h0dges, Sep 25, 2008
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.