Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc/powerd/scripts restart dhcpcd if we get a "released" eve...



details:   https://anonhg.NetBSD.org/src/rev/782d81cfe6e1
branches:  trunk
changeset: 770459:782d81cfe6e1
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon Oct 17 23:27:41 2011 +0000

description:
restart dhcpcd if we get a "released" event from the vmt0 driver

diffstat:

 etc/powerd/scripts/sleep_button |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r 9f0fd0a966d1 -r 782d81cfe6e1 etc/powerd/scripts/sleep_button
--- a/etc/powerd/scripts/sleep_button   Mon Oct 17 23:25:10 2011 +0000
+++ b/etc/powerd/scripts/sleep_button   Mon Oct 17 23:27:41 2011 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#      $NetBSD: sleep_button,v 1.9 2011/09/17 14:44:18 jym Exp $
+#      $NetBSD: sleep_button,v 1.10 2011/10/17 23:27:41 jmcneill Exp $
 #
 # Generic script for sleep button events.
 #
@@ -41,8 +41,12 @@
        ;;
 
 released)
-       # Note that we don't really need to handle a released event here,
-       # so we can gracefully exit.
+       case "${1}" in
+       vmt0)
+               # Virtual machine is resuming, restart the network
+               /etc/rc.d/dhcpcd restart
+               ;;
+       esac
        ;;
 *)
        logger -p warning "${0}: unsupported event ${2} on device ${1}" >&1



Home | Main Index | Thread Index | Old Index