Dear Folks,
My son's computer has br0 as the main network device (to support KVM virtual machines), but when the computer wakes up from sleep, I need to do sudo ifup br0 to have the machine get its address from the DHCP server. Does anyone have any suggestions towards automating a solution?
This is Fedora 14 x86_64 running on an iMac 27-inch.
On Wed, 2010-11-10 at 07:20 +1100, Nick Urbanik wrote:
but when the computer wakes up from sleep, I need to do sudo ifup br0 to have the machine get its address from the DHCP server. Does anyone have any suggestions towards automating a solution?
Perhaps with a script in: /etc/pm/sleep.d/
#!/bin/bash case "$1" in thaw|resume) /sbin/ifup br0 ;; *) ;; esac exit $?
-------------------------------
I do something similar to set hard drive parameters upon wakeup. The command line, in the middle, is different (for me).
On 11/09/2010 12:20 PM, Nick Urbanik wrote:
My son's computer has br0 as the main network device (to support KVM virtual machines), but when the computer wakes up from sleep, I need to do sudo ifup br0 to have the machine get its address from the DHCP server. Does anyone have any suggestions towards automating a solution?
I recommend using the "network" service instead of "NetworkManager" if you are using bridge devices (because NetworkManager cannot manage them).
# chkconfig network on # chkconfig NetworkManager off
Dear Tim,
On 10/11/10 07:34 +1030, Tim wrote:
On Wed, 2010-11-10 at 07:20 +1100, Nick Urbanik wrote:
Does anyone have any suggestions towards automating a solution?
Perhaps with a script in: /etc/pm/sleep.d/
#!/bin/bash case "$1" in thaw|resume) /sbin/ifup br0 ;; *) ;; esac exit $?
Thank you very much for this. You have taught me to look in a new place (/etc/pm/sleep.d) of which I was not previously aware! I really appreciate your help here.
Dear Gordon,
On 09/11/10 13:44 -0800, Gordon Messmer wrote:
I recommend using the "network" service instead of "NetworkManager" if you are using bridge devices (because NetworkManager cannot manage them).
# chkconfig network on # chkconfig NetworkManager off
Thank you very much for your thoughtful reply. I think that NetworkManager is still useful for wireless networking that the iMac has built in, and disabling NetworkManager may not necessarily solve the problem of calling dhclient after waking up. I suspect that it is possible to retain the benefits of NetworkManager for other transient networks while solving the immediate problem of calling dhclient on waking up.
I have as a consequence already had both enabled: $ for i in NetworkManager network;do chkconfig --list $i;done NetworkManager 0:off 1:off 2:on 3:on 4:on 5:on 6:off network 0:off 1:off 2:on 3:on 4:on 5:on 6:off