Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 24th March 2008, 02:31 AM
yersin Offline
Registered User
 
Join Date: Dec 2007
Posts: 18
Avoid restarting network service after hibernating

Hi.

After I hibernate my pc ("suspend to disk", using kpowersave) I always have to restart network (service network restart) so that it works; otherwise, ping 192.168.1.1 shows network unreachable (or something like that).

In short, how can i avoid having to restart network?
Reply With Quote
  #2  
Old 24th March 2008, 10:38 AM
BlueC Offline
Registered User
 
Join Date: Aug 2007
Location: Liverpool, UK
Posts: 733
Hmmmm... you shouldn't need to do that, so you have two options:

1) Find what is going wrong and try to fix it. It is most likely a problem with one of the kernel modules related to your network... you dont mention whether you are using a wired or wireless network? It could be that you need to create an "/etc/pm/config.d/unload_modules" to suspend the dodgy network module.

2) Just make a workaround that will bring the network back up after a suspend/resume cycle. Some script like this, saved as /etc/pm/sleep.d/48network and chmod to 755 should work...

Code:
#!/bin/bash

. /usr/lib/pm-utils/functions

suspend_network()
{
        if [ -f /var/lock/subsys/network ]; then
                savestate bug_network enabled
                service network stop
        else
                savestate bug_network disabled
        fi
}

resume_network()
{
        case "$(restorestate bug_network)" in
                enabled)
                        service network start
                        ;;
                disabled)
                        ;;
        esac
}

case "$1" in
        hibernate|suspend)
                suspend_network
                ;;
        thaw|resume)
                resume_network
                ;;
        *)
                ;;
esac

exit $?
HTH
C
Reply With Quote
Reply

Tags
avoid, hibernating, network, restarting, service

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
restarting network service brought system down zak_wang Using Fedora 19 4th November 2008 01:27 PM
System boots & network broken until service network restart. RTNETLINK complains! msodrew Servers & Networking 9 3rd July 2008 06:00 AM
Restarting networking service Jongi Servers & Networking 3 12th August 2007 02:28 AM
restarting network manager after suspend? high Using Fedora 5 5th December 2006 11:05 PM


Current GMT-time: 03:32 (Wednesday, 22-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat